We can handle lights in differents rooms and the air conditioner with our cellphone. We can also switch between two operation modes (manual and automatic). In automatic mode, garden lights and air conditioner will be activated when necessary.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 1:21ff089ca074
- Parent:
- 0:bdebfb736149
diff -r bdebfb736149 -r 21ff089ca074 main.cpp --- a/main.cpp Wed Aug 06 15:56:10 2014 +0000 +++ b/main.cpp Wed Aug 06 17:27:56 2014 +0000 @@ -46,11 +46,11 @@ lightRead=light.read(); //value between 0 - 1 if (manual==0) { //automatic mode if (lightRead<0.2) - ledGarden=1; //The ledGarden turn on at night //VA S??? + ledGarden=1; //The ledGarden turns on at night else - ledGarden=0; //Se prende de dia + ledGarden=0; //The ledGarden turns off during the day if (tempRead>30) - fan=1; //The fan turn on if it's hot + fan=1; //The fan turns on if it's hot else fan=0; }