This is an example for sending data to IFTTT using WizFi250

Dependencies:   IFTTT WizFi250Interface mbed

Files at this revision

API Documentation at this revision

Comitter:
jehoon
Date:
Thu Jul 23 05:54:58 2015 +0000
Commit message:
This is an example for Connect IFTTT using WizFi250 and WIZwiki-W7500.

Changed in this revision

IFTTT.lib Show annotated file Show diff for this revision Revisions of this file
WizFi250Interface.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r e8b5220fd0c8 IFTTT.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IFTTT.lib	Thu Jul 23 05:54:58 2015 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/mbedAustin/code/IFTTT/#15c6c9f87c32
diff -r 000000000000 -r e8b5220fd0c8 WizFi250Interface.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/WizFi250Interface.lib	Thu Jul 23 05:54:58 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/kaizen/code/WizFi250Interface/#1f5121c5efcd
diff -r 000000000000 -r e8b5220fd0c8 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Jul 23 05:54:58 2015 +0000
@@ -0,0 +1,44 @@
+#include "mbed.h"
+#include "WizFi250Interface.h"
+#include "ifttt.h"
+
+#define SECURE WizFi250::SEC_AUTO
+#define SSID "ssid"
+#define PASS "password"
+
+#define YourEventName "YourEventName"
+#define YourSecretKey "YourSecretKey"
+
+    WizFi250Interface wizfi250(D1,D0,D7,D8,PA_12,NC,115200);
+    TCPSocketConnection sock;
+    Serial pc(USBTX, USBRX); // tx, rx
+    
+int main()
+{ 
+    pc.baud(115200);
+   
+    pc.printf("WizFi250_IFTTT Send example. \r\n");
+    wizfi250.init();
+    wizfi250.connect(SECURE, SSID, PASS);
+    pc.printf("IP Address is %s\r\n", wizfi250.getIPAddress());
+
+    // Initialize ifttt object, add up to 3 optional values, trigger event.
+    IFTTT ifttt(YourEventName,YourSecretKey, &sock); // EventName, Secret Key, socket to use
+    ifttt.addIngredients("this is awesome","test-ing","data!!!");     // 3 optional Values to send along with trigger.
+    ifttt.trigger();
+
+    // Send data using GET
+    ifttt.addIngredients("Sending","GET","data");
+    ifttt.trigger(IFTTT_GET);
+
+    // Send Data using POST
+    ifttt.addIngredients("Sending","POST","things");
+    ifttt.trigger(IFTTT_POST);
+    
+    sock.close();
+    wizfi250.disconnect();
+    
+    while(1) {
+    }
+}
+
diff -r 000000000000 -r e8b5220fd0c8 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Jul 23 05:54:58 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/bad568076d81
\ No newline at end of file