ULTRASONIC SERVO COMBO - ST IOT CHALLENGE 2020

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

Revision:
3:4056f1cd4c47
Parent:
2:445f09de09bd
Child:
4:939f308d004a
--- a/main.cpp	Wed Oct 26 23:01:03 2016 +0000
+++ b/main.cpp	Fri Nov 04 19:39:28 2016 +0000
@@ -153,13 +153,13 @@
         // Publish some example data every few seconds. This should be changed to send your actual data to Cayenne.
         if (timer.expired()) {
             int error = 0;
-            if ((error = mqttClient.publishData(DATA_TOPIC, 1, TEMPERATURE, CELSIUS, 30.5)) != CAYENNE_SUCCESS) {
+            if ((error = mqttClient.publishData(DATA_TOPIC, 1, TYPE_TEMPERATURE, UNIT_CELSIUS, 30.5)) != CAYENNE_SUCCESS) {
                 printf("Publish temperature failed, error: %d\n", error);
             }
-            if ((error = mqttClient.publishData(DATA_TOPIC, 2, LUMINOSITY, LUX, 1000)) != CAYENNE_SUCCESS) {
+            if ((error = mqttClient.publishData(DATA_TOPIC, 2, TYPE_LUMINOSITY, UNIT_LUX, 1000)) != CAYENNE_SUCCESS) {
                 printf("Publish luminosity failed, error: %d\n", error);
             }
-            if ((error = mqttClient.publishData(DATA_TOPIC, 3, BAROMETRIC_PRESSURE, HECTOPASCAL, 800)) != CAYENNE_SUCCESS) {
+            if ((error = mqttClient.publishData(DATA_TOPIC, 3, TYPE_BAROMETRIC_PRESSURE, UNIT_HECTOPASCAL, 800)) != CAYENNE_SUCCESS) {
                 printf("Publish barometric pressure failed, error: %d\n", error);
             }
             timer.countdown_ms(5000);