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: mbed C12832 DHT DHT11
Revision 1:c33171654467, committed 2021-10-17
- Comitter:
- tollidal
- Date:
- Sun Oct 17 10:27:16 2021 +0000
- Parent:
- 0:01f3ce729f40
- Commit message:
- Strawberry Forever Fan controlled by temp & humidity sensor
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Oct 12 19:26:01 2021 +0000
+++ b/main.cpp Sun Oct 17 10:27:16 2021 +0000
@@ -4,7 +4,7 @@
C12832 lcd(p5, p7, p6, p8, p11); //LCD screen
-DHT sensor(p20,DHT11); // Use the SEN11301P sensor
+DHT sensor(p16,DHT11); // Use the SEN11301P sensor
DigitalOut fan(p18);
int main()
@@ -64,8 +64,8 @@
lcd.printf("Humidity: %4.2f", h);
wait(2);
- //turn fan on if temperature is above 25
- if(c > 21) fan=1; //fan is on
+ //turn fan on if temperature is above 26
+ if(c > 26) fan=1; //fan is on
else fan=0; //Fan is off