ULTRASONIC SERVO COMBO - ST IOT CHALLENGE 2020

Dependencies:   Cayenne-MQTT-mbed mbed Servo X_NUCLEO_IDW01M1v2 NetworkSocketAPI HCSR04

Revision:
13:3b275daf1df3
Parent:
12:dd98953c0a6d
diff -r dd98953c0a6d -r 3b275daf1df3 main.cpp
--- a/main.cpp	Wed Jul 17 05:10:39 2019 +0000
+++ b/main.cpp	Fri Feb 28 03:03:58 2020 +0000
@@ -73,7 +73,7 @@
 
 MQTTTimer publishData(MQTTTimer timer, int data1, int data2){
      // Publish some example data every few seconds. This should be changed to send your actual data to Cayenne.
-        if (timer.expired()) {
+     //   if (timer.expired()) {
             int error = 0;
             if ((error = mqttClient.publishData(DATA_TOPIC, 1, TYPE_VOLTAGE, UNIT_DIGITAL, data1)) != CAYENNE_SUCCESS) {
                 printf("Publish data failed, error: %d\n", error);
@@ -82,8 +82,8 @@
                 printf("Publish data 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(1500);
-        }   
+     //       timer.countdown_ms(1500);
+     //   }   
         return timer;
 }