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.
Diff: main.cpp
- Revision:
- 6:c6fa68fb56ea
- Parent:
- 5:124172cff206
diff -r 124172cff206 -r c6fa68fb56ea main.cpp
--- a/main.cpp Fri Jan 22 10:46:55 2021 +0000
+++ b/main.cpp Sun Jan 24 17:27:21 2021 +0000
@@ -170,10 +170,10 @@
}
}
void setActuators() {
- if (myData.ambientTemp > myData.highTempThresh) boilerLed = false; // above upper temp thresh
- if (myData.ambientTemp > myData.lowTempThresh) boilerLed = true; // below lower temp thresh
- if (myData.ambientLight > myData.highLightThresh) lightingLed = false; // above upper light level thresh
- if (myData.ambientLight > myData.lowLightThresh) lightingLed = true; // below lower light level thresh
+ if (myData.ambientLight > myData.lowLightThresh) lightingLed = true; // Light on when light level beneath thresh
+ if (myData.ambientLight > myData.highLightThresh) lightingLed = false; // Light off when light level above thresh
+ if (myData.ambientTemp > myData.lowTempThresh) lightingLed = true; // boiler on when temp below thresh
+ if (myData.ambientTemp > myData.highTempThresh) lightingLed = false; // boiler off when above thresh
}
void readSensors()
{
@@ -236,7 +236,7 @@
sprintf(buffer, "%2.1f%c ", myData.highLightThresh, 0x25);
displayAt(47, 5, buffer);
sprintf( buffer, "The lights are %s", lightingLed?"On ":"Off" );
- displayAt(1, 6, buffer);
+ displayAt(1, 7, buffer);
}
void displayAt( int x, int y, char *buffer )