Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Cayenne-MQTT-mbed mbed TMP36 X_NUCLEO_IDW01M1v2 NetworkSocketAPI
Diff: main.cpp
- Revision:
- 1:06d715293bc5
- Parent:
- 0:4d7a64104b46
- Child:
- 2:d7c27e622707
--- a/main.cpp Tue Nov 01 18:48:43 2016 +0000
+++ b/main.cpp Fri Nov 04 19:42:20 2016 +0000
@@ -155,7 +155,7 @@
// 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, 5, TEMPERATURE, CELSIUS, tmpSensor.read())) != CAYENNE_SUCCESS) {
+ if ((error = mqttClient.publishData(DATA_TOPIC, 5, TYPE_TEMPERATURE, UNIT_CELSIUS, tmpSensor.read())) != CAYENNE_SUCCESS) {
printf("Publish temperature failed, error: %d\n", error);
}
timer.countdown_ms(5000);