Jeff Chen / Mbed 2 deprecated TCPSocket_Ethernet-1

Dependencies:   EthernetInterface IFTTT mbed-rtos mbed

Fork of TCPSocket_Ethernet by TaChing Yu

Revision:
3:97c3e915a108
Parent:
2:807d696cf266
--- a/main.cpp	Sun Sep 11 06:12:16 2016 +0000
+++ b/main.cpp	Sun Sep 11 06:49:25 2016 +0000
@@ -1,6 +1,7 @@
 #include "mbed.h"
 #include "EthernetInterface.h"
 #include "TCPSocketConnection.h"
+#include "ifttt.h"
 
 EthernetInterface eth;
 RawSerial pc(USBTX, USBRX); // tx, rx
@@ -29,19 +30,34 @@
     }
       
     printf("DONE!\n");
-      
+      // Initialize ifttt object, add up to 3 optional values, trigger event.
+    IFTTT ifttt("hellowordmbed","ExqSjQiwzZINRMFTOgo--", &socket); // 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);
+
+   
+    
     socket.close();
     
     eth.disconnect();
     
-    while(1) {}
+   while(1) {
+    }
 }
 extern "C" void mbed_mac_address(char *mac)
 {
     mac[0] = 0xD4;
     mac[1] = 0x3D;
     mac[2] = 0x7E;
-    mac[3] = 0x3C;
+    mac[3] = 0x2C;
     mac[4] = 0x7E;
     mac[5] = 0x1C;
-};
\ No newline at end of file
+};