LED Demo for Tech Con 2014
Dependencies: EthernetInterface PololuLedStripx mbed-rtos mbed nanoservice_client_1_12_X
Fork of LPC1768_LWM2M_Client by
Diff: main.cpp
- Revision:
- 7:59c7b96ace5b
- Parent:
- 5:fcfba34d1aeb
- Child:
- 8:1358fc888c9c
--- a/main.cpp Sun Sep 28 03:15:49 2014 +0000 +++ b/main.cpp Sun Sep 28 23:59:14 2014 +0000 @@ -32,7 +32,7 @@ //static const char* NSP_ADDRESS = "192.168.1.200"; static const int NSP_PORT = 5683; char endpoint_name[24] = "LED-booth-"; -uint8_t ep_type[] = {"mbed_device"}; +uint8_t ep_type[] = {"LED-STRIP"}; uint8_t lifetime_ptr[] = {"60"}; char mac[6]; char macstring[13] ; @@ -65,6 +65,10 @@ UDPSocket server; Endpoint nsp; + +bool UDP_blocking = false; +unsigned int UDP_timeout = 1000; + char * ipstring; char * uid; @@ -72,6 +76,9 @@ { server.init(); server.bind(NSP_PORT); + + /* server.set_blocking(UDP_blocking, UDP_timeout); */ + nsp.set_address(NSP_ADDRESS, NSP_PORT);