Example ARM Mbed client for connecting to the thinger.io platform.
Dependencies: ThingerEthernetClient mbed
main.cpp
00001 #include "mbed.h" 00002 #include "ThingerEthernetClient.h" 00003 00004 DigitalOut redLed(LED1); 00005 00006 void redLedCallback(pson& in){ 00007 redLed = in ? 0 : 1; 00008 } 00009 00010 int main() { 00011 ThingerEthernetClient thing("username", "device_id", "device_credential"); 00012 00013 thing["red_led"].set_input(redLedCallback); 00014 00015 while(true){ 00016 thing.handle(); 00017 } 00018 }
Generated on Sat Jul 16 2022 18:48:47 by 1.7.2