Example ARM Mbed client for connecting to the thinger.io platform.
Dependencies: ThingerEthernetClient mbed
main.cpp
- Committer:
- alvarolb
- Date:
- 2015-12-28
- Revision:
- 1:eaf1cc124052
- Parent:
- 0:3da5c7b671dd
File content as of revision 1:eaf1cc124052:
#include "mbed.h" #include "ThingerEthernetClient.h" DigitalOut redLed(LED1); void redLedCallback(pson& in){ redLed = in ? 0 : 1; } int main() { ThingerEthernetClient thing("username", "device_id", "device_credential"); thing["red_led"].set_input(redLedCallback); while(true){ thing.handle(); } }