trash over HTTP

Dependencies:   C027_Support HTTPClient TrashSensors mbed Crypto

Fork of SLOTrashHTTP by Corey Ford

Collects sensor readings and sends them to https://trash.coreyford.name/

Server code: https://github.com/coyotebush/trash-map

Revision:
8:2398817ac9c2
Parent:
7:49f2a1277737
Child:
9:ce77a3614cd7
--- a/main.cpp	Thu Jun 04 04:59:57 2015 +0000
+++ b/main.cpp	Tue Oct 27 04:24:10 2015 +0000
@@ -70,13 +70,14 @@
         distS.start();
         wait_ms(500); 
         distV = distS.get_dist_cm();
-        printf("sensor reading: %0.2f\r\n", distV);
+        printf("Distance reading: %0.2f cm\r\n", distV);
         
         // Temperature sensor
         tempV = tempS.getTemp();
+        printf("Temperature reading: %0.2f C\r\n", tempV);
         
         // GPS
-        printf("trying GPS\r\n");
+        printf("Checking for GPS messages\r\n");
         while ((gpsRet = gps.getMessage(gpsBuf, sizeof(gpsBuf))) > 0)
         {
             int len = LENGTH(gpsRet);
@@ -120,7 +121,7 @@
         map.put("name", SENSOR_NAME);
         map.put("value", json);
         map.put("mac", hmacHex);
-        printf("\r\nTrying to post data...\r\n");
+        printf("\r\nTrying to POST data to server...\r\n");
         int ret = http.post(HTTP_ENDPOINT, map, &inText);
         if (!ret)
         {