Skip to content

Instantly share code, notes, and snippets.

@okhiroyuki
Created November 12, 2015 15:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save okhiroyuki/cf6a5c8ebcb065845166 to your computer and use it in GitHub Desktop.
Save okhiroyuki/cf6a5c8ebcb065845166 to your computer and use it in GitHub Desktop.
IFTTT Maker Channel
#include <Process.h>
void setup(){
Bridge.begin();
Serial.begin(9600);
while(!Serial);
}
void loop() {
Process process;
String curlCmd;
// curlCmd生成
curlCmd = "curl -X POST http://maker.ifttt.com/trigger/test/with/key/{private_key}";
// 投稿
process.runShellCommand(curlCmd);
while(process.running());
// Read out the response:
Serial.print("Response: ");
while (process.available()) {
char c = process.read();
Serial.write(c);
}
for(;;);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment