Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ESP8266Interface IFTTT mbed
Fork of IFTTT_Ethernet_Example by
main.cpp
00001 #include "mbed.h" 00002 #include "ESP8266Interface.h" 00003 #include "TCPSocketConnection.h" 00004 #include "ifttt.h" 00005 00006 ESP8266Interface wifi(D1,D0,D2,"ssid","passkey",115200); // TX,RX,Reset,SSID,Password,Baud 00007 RawSerial pc(USBTX, USBRX); // tx, rx 00008 00009 int main() 00010 { 00011 pc.baud(9600); 00012 wifi.init(); //Reset 00013 wifi.connect(); //Use DHCP 00014 printf("IP Address is %s \n\r", wifi.getIPAddress()); 00015 TCPSocketConnection socket; 00016 00017 // Initialize ifttt object, add up to 3 optional values, trigger event. 00018 IFTTT ifttt("YourEventName","ChangeToYourSecretKey", &socket); // EventName, Secret Key, socket to use 00019 ifttt.addIngredients("this is awesome","test-ing","data!!!"); // 3 optional Values to send along with trigger. 00020 ifttt.trigger(); 00021 00022 ifttt.addIngredients("Sending","GET","data"); 00023 ifttt.trigger(IFTTT_GET); 00024 00025 ifttt.addIngredients("Sending","POST","things"); 00026 ifttt.trigger(IFTTT_POST); 00027 while(1) { 00028 } 00029 }
Generated on Tue Jul 12 2022 19:25:39 by
1.7.2

If This Then That (IFTTT)