cellular port
Dependencies: Beep C027_Support C12832 LM75B MMA7660 mbed-rtos mbed nsdl_lib
This is a port of the NSDL HelloWorld for cellular.
To run the example you need a C027 and the ARM mbed application shield. The example uses cellular instead of ethernet and takes the true position from the GPS instead of using a fixed position.
Diff: resources/light.cpp
- Revision:
- 8:bd9096c4784c
- Parent:
- 2:7e489126fe7a
- Child:
- 10:443e7f741c8e
--- a/resources/light.cpp Tue Oct 22 10:50:05 2013 +0000 +++ b/resources/light.cpp Tue May 20 15:24:18 2014 +0000 @@ -7,10 +7,7 @@ #define LIGHT_RES_ID "lt/0/dim" extern Serial pc; -//PwmOut led1(LED1); -static PwmOut led2(LED2); -static PwmOut led3(LED3); -//PwmOut led4(LED4); +static PwmOut led1(LED1); /* Only GET and PUT method allowed */ static uint8_t light_resource_cb(sn_coap_hdr_s *received_coap_ptr, sn_nsdl_addr_s *address, sn_proto_info_s * proto) @@ -42,10 +39,7 @@ led_dimm = atof(led_dimm_temp); led_dimm = led_dimm/100; - //led1.write(led_dimm); - led2.write(led_dimm); - led3.write(led_dimm); - //led4.write(led_dimm); + led1.write(led_dimm); coap_res_ptr = sn_coap_build_response(received_coap_ptr, COAP_MSG_CODE_RESPONSE_CHANGED); sn_nsdl_send_coap_message(address, coap_res_ptr);