Created
November 12, 2015 15:12
-
-
Save okhiroyuki/cf6a5c8ebcb065845166 to your computer and use it in GitHub Desktop.
IFTTT Maker Channel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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