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: main.cpp
- Revision:
- 10:443e7f741c8e
- Parent:
- 9:e4c916c6cb02
- Child:
- 11:fa12b9f50538
diff -r e4c916c6cb02 -r 443e7f741c8e main.cpp --- a/main.cpp Fri Jun 06 15:16:37 2014 +0000 +++ b/main.cpp Tue Jun 17 07:05:29 2014 +0000 @@ -1,4 +1,5 @@ #include "mbed.h" +#include "rtos.h" #include "C12832.h" #include "nsdl_support.h" #include "dbg.h" @@ -37,7 +38,7 @@ /* Change this IP address to that of your NanoService Platform installation */ static const char* NSP_ADDRESS = "nanoservice-demo.mbed.org"; /* demo NSP, web interface at http://nanoservice-demo.mbed.org*/ static const int NSP_PORT = 5683; -char endpoint_name[16] = "mbed-"; +char endpoint_name[16] = "mbed-cellular"; uint8_t ep_type[] = {"mbed_device"}; uint8_t lifetime_ptr[] = {"1200"}; @@ -114,12 +115,14 @@ int main() { + Serial pc(USBTX, USBRX); + pc.baud(115200); lcd.cls(); lcd.locate(0,0); lcd.printf("mbed NanoService demo"); NSDL_DEBUG("mbed NanoService Example App 0.1\n"); - MDMSerial mdm; + MDMRtos<MDMSerial> mdm; //mdm.setDebug(4); // enable this for debugging issues if (!mdm.connect(SIMPIN, APN,USERNAME,PASSWORD)) return -1;