asdasd

Dependencies:   Cayenne-MQTT-mbed mbed X_NUCLEO_IKS01A2 X_NUCLEO_IDW01M1v2 NetworkSocketAPI TMP36

Revision:
5:294a8b1bca28
Parent:
2:d7c27e622707
Child:
6:8aa852ca98d8
--- a/main.cpp	Wed Nov 09 17:21:56 2016 +0000
+++ b/main.cpp	Fri Nov 11 18:31:11 2016 +0000
@@ -134,6 +134,7 @@
 */
 void loop(void)
 {
+    // Start the countdown timer for publishing data every 5 seconds. Change the timeout parameter to publish at a different interval.
     MQTTTimer timer(5000);
     TMP36 tmpSensor(A5);
     
@@ -158,6 +159,7 @@
             if ((error = mqttClient.publishData(DATA_TOPIC, 5, TYPE_TEMPERATURE, UNIT_CELSIUS, tmpSensor.read())) != CAYENNE_SUCCESS) {
                 printf("Publish temperature failed, error: %d\n", error);
             }
+            // Restart the countdown timer for publishing data every 5 seconds. Change the timeout parameter to publish at a different interval.
             timer.countdown_ms(5000);
         }
     }