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: C027 C027_Support mbed mbed-rtos MbedSmartRest LM75B MMA7660 C12832
Fork of MbedSmartRestTest by
Diff: program.cpp
- Revision:
- 25:8604bef314c1
- Parent:
- 24:8f9b678a7932
- Child:
- 26:26e9899e2cbe
--- a/program.cpp Tue Apr 15 16:59:56 2014 +0000
+++ b/program.cpp Wed Apr 16 07:44:36 2014 +0000
@@ -78,7 +78,6 @@
}
}
update(deviceId);
-
printf("Device ID: %ld\r\n", deviceId);
timer.start();
@@ -253,26 +252,31 @@
void loop(long deviceId)
{
- Aggregator aggr(5, false, true);
+ Aggregator aggr(8, false, true);
lcd_status("Sending measurements...");
signalMeasurement(deviceId, aggr);
if (client.send(aggr) != SMARTREST_SUCCESS) {
- puts("Send failed.");
+ puts("Loop send failed.");
}
client.stop();
aggr.clear();
temperatureMeasurement(deviceId, aggr);
+ if (client.send(aggr) != SMARTREST_SUCCESS) {
+ puts("Loop send failed.");
+ }
+ client.stop();
+ aggr.clear();
analogMeasurement(deviceId, aggr);
if (client.send(aggr) != SMARTREST_SUCCESS) {
- puts("Send failed.");
+ puts("Loop send failed.");
}
client.stop();
aggr.clear();
motionMeasurement(deviceId, aggr);
if (client.send(aggr) != SMARTREST_SUCCESS) {
- puts("Send failed.");
+ puts("Loop send failed.");
}
client.stop();
}
