Example ARM Mbed client for connecting to the thinger.io platform.
Dependencies: ThingerEthernetClient mbed
Diff: main.cpp
- Revision:
- 0:3da5c7b671dd
- Child:
- 1:eaf1cc124052
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Dec 28 13:07:48 2015 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "ThingerEthernetClient.h" + +DigitalOut redLed(LED1); + +void redLedCallback(pson& in){ + redLed = in ? 0 : 1; +} + +int main() { + ThingerEthernetClient thing("alvarolb", "wiznet", "wiznet"); + + thing["red_led"].set_input(redLedCallback); + + while(true){ + thing.handle(); + } +}