port to cellular

Dependencies:   C027_Support LM75B M2XStreamClient jsonlite mbed mbed-rtos

Fork of m2x-demo-all by AT&T M2X Team

Revision:
6:7a1e717a0d1e
Parent:
5:df776765d890
Child:
7:10d3cc37fe4c
--- a/main.cpp	Thu Jun 05 09:13:43 2014 +0000
+++ b/main.cpp	Thu Jun 05 11:26:57 2014 +0000
@@ -96,23 +96,25 @@
         int response = m2xClient.post(feedId, streamName, buf);
         printf("Post response code: %d\r\n", response);
         if (response == -1) while (true) ;
-        
+//#define READING
+#ifdef READING
         // read temperature
         response = m2xClient.fetchValues(feedId, streamName, on_data_point_found, NULL);
         printf("Fetch response code: %d\r\n", response);
         if (response == -1) while (true) ;
-    
+#endif    
         // update location
         if (location_valid) {
             response = m2xClient.updateLocation(feedId, name, latitude, longitude, elevation);
             printf("updateLocation response code: %d\r\n", response);
             if (response == -1) while (true) ;
         }
-        
+#ifdef READING
         // read location
         response = m2xClient.readLocation(feedId, on_location_found, NULL);
         printf("readLocation response code: %d\r\n", response);
         if (response == -1) while (true) ;
+#endif
     }
     else {
         delay(100);