Grove temp sensor with mbed LPC1768
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 |
diff -r 01f3ce729f40 -r c33171654467 main.cpp --- 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