Project Autus - Automated Plant Chamber
Fork of keypad_test by
Autus
This is the codebase accompanying the project Autus.
Autus is an automated growth chamber for plants.
Features
Control Humidity inside chamber wrt to external humidity. Control Temperature inside chamber. ( Peltier Heaters/Coolers ) Water and shower plants. Control soil humidity. Monitor water tanks level (Load Cell)
Code Base Features
Fixed timing and CRC for DHT-11 Sensor. Fixed OneWire bug for ds18b20
Cyclic Executive Scheduler with Priority. Async IPC framework for PC App over bluetooth
Fake RTC systick, I was having some trouble with the on board rtc.
Diff: main.cpp
- Revision:
- 29:b712f073a397
- Parent:
- 28:4242ab5a1e58
- Child:
- 30:417e8ba439ff
diff -r 4242ab5a1e58 -r b712f073a397 main.cpp --- a/main.cpp Sun Apr 13 01:17:52 2014 +0000 +++ b/main.cpp Sun Apr 13 01:46:18 2014 +0000 @@ -296,6 +296,7 @@ lcd.cls(); int counter_menu =0 ; + bool overflow_menu = false; while(!exit_settings){ key_value = Keypad(); @@ -307,6 +308,7 @@ lcd.locate(0,1); if(counter_menu ==3){ counter_menu = 0; + overflow_menu=true; lcd.printf(" %s",menu[counter_menu].c_str()); } else{ @@ -316,7 +318,9 @@ }//No Press If Block else if(key_value == 70){//Down Key Pressed if block lcd.cls(); - counter_menu++; + if(overflow_menu==false){ + counter_menu++;} + else{overflow_menu=false;} }//Down Key Pressed if block end else if(key_value == 69){ //OK Key Pressed if block settings_submenu(counter_menu);