v 2
Dependencies: PinDetect libmDot mbed-rtos mbed-src
Fork of thermostat_fan_demo-sensor_battery-1 by
Diff: thermostat_fan_demo-sensor-d55b476ea5e6/main.cpp
- Revision:
- 1:6011d8873701
- Parent:
- 0:a4991ca18f91
- Child:
- 2:8fd3285d3395
--- a/thermostat_fan_demo-sensor-d55b476ea5e6/main.cpp Tue Oct 20 07:26:07 2015 +0000 +++ b/thermostat_fan_demo-sensor-d55b476ea5e6/main.cpp Tue Oct 20 21:26:23 2015 +0000 @@ -127,8 +127,8 @@ } timeToReadTemperature = false; - } - } + } + //uint16_t voltage; while (1) { @@ -137,6 +137,7 @@ timeToReadBattery = false; } + if (dataChanged) { char latestData[100]; transmitLED = 1; @@ -144,6 +145,7 @@ sprintf(latestData, "temp: %d,set: %d,volt: %d", temperature, sentSetPoint, voltage); printf("%s\r\n", latestData); + if (send(latestData)) { dataChanged = false; } @@ -151,6 +153,7 @@ } } } +} void ledTock() { transmitLED = !transmitLED; @@ -294,3 +297,4 @@ +