Thinger.io / Mbed 2 deprecated ThingerWiznetClientExample

Dependencies:   ThingerWIZnetClient mbed

Fork of ThingerWiznetClientExample by Alvaro Luis Bustamante

Files at this revision

API Documentation at this revision

Comitter:
alvarolb
Date:
Sat Dec 26 18:12:46 2015 +0000
Commit message:
Initial Commit

Changed in this revision

ThingerWIZnetClient.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 b756c85bcd9e ThingerWIZnetClient.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ThingerWIZnetClient.lib	Sat Dec 26 18:12:46 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/alvarolb/code/ThingerWIZnetClient/#98914de56323
diff -r 000000000000 -r b756c85bcd9e main.cpp
--- /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();
+    }
+}
diff -r 000000000000 -r b756c85bcd9e mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Dec 26 18:12:46 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4336505e4b1c
\ No newline at end of file