IFTTT triggering example

Dependencies:   EthernetInterface IFTTT mbed-rtos mbed

Files at this revision

API Documentation at this revision

Comitter:
ytsuboi
Date:
Sun Mar 27 10:37:06 2016 +0000
Child:
1:99b0c3e836d6
Commit message:
first commit

Changed in this revision

EthernetInterface.lib Show annotated file Show diff for this revision Revisions of this file
IFTTT.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-rtos.lib 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EthernetInterface.lib	Sun Mar 27 10:37:06 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/EthernetInterface/#4d7bff17a592
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IFTTT.lib	Sun Mar 27 10:37:06 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/mbedAustin/code/IFTTT/#935972c2f628
--- /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);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Sun Mar 27 10:37:06 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed-rtos/#bdd541595fc5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Mar 27 10:37:06 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/c0f6e94411f5
\ No newline at end of file