This example program uses the ARM mbed HTTP client library to send/receive data to/from AT&T's M2X service (https://m2x.att.com/) using the AT&T Cellular IoT Starter Kit from Avnet (http://cloudconnectkits.org/product/att-cellular-iot-starter-kit). This kit contains a FRDM-K64F from NXP (https://developer.mbed.org/platforms/FRDM-K64F/).

Dependencies:   M2XStreamClient-JMF WNCInterface jsonlite mbed-rtos mbed

See the README for details on this example program. NOTE: When started, the program can take up to 40 seconds before it will respond. This delay is the time required for the WNC Data Module to connect with the network.

Revision:
1:1c840717deea
Parent:
0:62feed0f1fd9
Child:
2:eb0768c06c1b
--- a/main.cpp	Wed Sep 21 16:22:43 2016 +0000
+++ b/main.cpp	Tue Sep 27 20:02:21 2016 +0000
@@ -39,6 +39,7 @@
 Client client;
 M2XStreamClient m2xClient(&client, m2xKey);
 TimeService timeService(&m2xClient);
+MODSERIAL pc(USBTX,USBRX,256,256);
 
 void on_data_point_found(const char* at, const char* value, int index, void* context, int type) {
   printf(">>Found a data point, index: %d type: %d" CRLF, index, type);
@@ -72,6 +73,7 @@
   double temp=0.00;  //we will just increment these 0.01 each time through the loop
   double humid=0.00; //we will just increment these 1 each time through the loop wrapping at 100
 
+  pc.baud(115200);
   printf("Start m2x-demo-all by initializng the network" CRLF);
   response = eth.init();                     
   printf("WNC Module %s initialized (%02X)." CRLF, response?"IS":"IS NOT", response);