티스토리 뷰
Sample Source Code
void b_Send2IFTTT(String EventValue){
Serial.print("Connecting to ");
Serial.println(IFTTTAddress);
WiFiClient client;
const int httpPort = 80;
if(!client.connect(IFTTTAddress, httpPort)){
Serial.println("Connection to IFTTT Failed");
return;
}
//String urlString = String(IFTTTAddress) + "/trigger/";
String urlString = "/trigger/";
urlString += EventValue;
urlString += "/with/key/";
urlString += IFTTTKey;
String mJson = String("{\"value1\":\"") + "Bilient\"}";
Serial.print("[URL]");
Serial.println(urlString);
client.println(String("POST ") + urlString + " HTTP/1.1");
client.println(String("Host: ") + String(IFTTTAddress));
client.println("Content-Type: application/json");
client.print("Content-Length: ");
client.println(mJson.length());
client.println();
client.println(mJson);
while(client.connected()){
if(client.available()){
String line = client.readStringUntil('\r');
Serial.print(line);
}else{
delay(50);
}
}
Serial.println();
Serial.println("cloing connection");
client.stop();
}
Reference : https://maker.ifttt.com
IFTTT
Connect your Webhooks to woopla phone calls, Garadget and more. Integrate other services on IFTTT with your DIY projects. You can create Applets that work with any device or app that can make or receive a web request. If you'd like to build your own servic
ifttt.com
반응형
'SWDesk > Firmware' 카테고리의 다른 글
[BMS] Command Process for Master (0) | 2020.07.19 |
---|---|
[BPM] Firmware Source for Master (0) | 2020.06.15 |
[BMS] Firmware for Measurement Device (0) | 2020.04.29 |
[BMS] Firmware for WiFi Device (0) | 2020.04.28 |
[BMS] Firmware for Wireless Device (0) | 2020.04.27 |
반응형
250x250
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 절연형
- 혁신과허들
- 아두이노
- 치매방지
- 전압
- 심심풀이
- 둎
- 전압전류모니터링
- DYOV
- badp
- 허들
- arduino
- 전류
- Video
- 티스토리챌린지
- 혁신
- Hurdles
- Innovations
- Innovation&Hurdles
- 치매
- 오블완
- bilient
- 심심풀이치매방지기
- ServantClock
- Decorator
- image
- 빌리언트
- BSC
- Innovations&Hurdles
- 배프
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함