Thinger.io Client Example for the WIZnet platform.

Dependencies:   ThingerWIZnetClient mbed

Fork of ThingerWiznetClientExample by Alvaro Luis Bustamante

Revision:
0:b756c85bcd9e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Dec 26 18:12:46 2015 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+#include "ThingerEthernetClient.h"
+
+DigitalOut redLed(LEDR);
+DigitalOut greenLed(LEDG);
+DigitalOut blueLed(LEDB);
+
+void redLedCallback(pson& in){
+    redLed = in ? false : true;
+}
+
+void greenLedCallback(pson& in){
+    greenLed = in ? false : true;
+}
+
+void blueLedCallback(pson& in){
+    blueLed = in ? false : true;
+}
+
+int main()
+{
+    ThingerEthernetClient thing("username", "device_id", "device_credential");
+
+    thing["red_led"].set_input(redLedCallback);
+    thing["green_led"].set_input(greenLedCallback);
+    thing["blue_led"].set_input(blueLedCallback);
+    
+    while(true) {
+        thing.handle();
+    }
+}