IFTTT triggering example

Dependencies:   EthernetInterface IFTTT mbed-rtos mbed

Revision:
0:a8dedd1df78f
Child:
1:99b0c3e836d6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Mar 27 10:37:06 2016 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+#include "EthernetInterface.h"
+#include "TCPSocketConnection.h"
+#include "ifttt.h"
+
+EthernetInterface eth;
+Serial pc(USBTX, USBRX); // tx, rx
+
+int main()
+{
+    pc.baud(9600);
+    eth.init(); //Use DHCP
+    eth.connect();
+    TCPSocketConnection socket;
+
+    // Initialize ifttt object, add up to 3 optional values, trigger event.
+    IFTTT ifttt("EventName","SecurityKey", &socket); // EventName, Secret Key, socket to use
+
+    // Send Data using POST
+    ifttt.addIngredients("20 - 30"); //Value1
+    ifttt.trigger(IFTTT_POST);
+}