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:
- 33:d1b04f1a792a
- Parent:
- 32:d8b232481ec5
- Child:
- 35:8bea464c2028
diff -r d8b232481ec5 -r d1b04f1a792a main.cpp --- a/main.cpp Sun Apr 13 02:21:19 2014 +0000 +++ b/main.cpp Sun Apr 13 02:45:38 2014 +0000 @@ -300,7 +300,7 @@ while(!exit_settings){ key_value = Keypad(); - printf("Key %d\n\r",key_value); + //printf("Key %d\n\r",key_value); wait(0.1); if(key_value == 150){ lcd.locate(0,0); @@ -320,13 +320,14 @@ lcd.cls(); if(overflow_menu==false){ counter_menu++; - printf("CounterOverflow)"); + //printf("CounterOverflow)"); } else{overflow_menu=false;} }//Down Key Pressed if block end else if(key_value == 69){ //OK Key Pressed if block settings_submenu(counter_menu); + lcd.cls(); } //OK button if block else if(key_value == 75){ //OK Button exit_settings = true; @@ -417,7 +418,7 @@ lcd_backlight_on(); //FOR INTERNAL CLOCK - //clock_mine.attach(&sec_inc, 1.0); + clock_mine.attach(&sec_inc, 1.0); char keypad_value; int ui_current_screen = 1; //************************************BOOT SEQUENCE********************* @@ -501,25 +502,29 @@ ui_screen2(); ui_current_screen=2; wait(5); + lcd.cls(); //led_blue_pulsewidth=led_blue_pulsewidth+100; //led_blue.pulsewidth_us(led_blue_pulsewidth); //printf("%c\n\r",keypad_value); } else if ( (keypad_value==62) && (ui_current_screen==2)) { ui_screen3(); - ui_current_screen=1; + ui_current_screen=3; wait(5); + lcd.cls(); //printf("%c\n\r",keypad_value); } else if ( (keypad_value==62) && (ui_current_screen==3)) { ui_screen4(); ui_current_screen=1; wait(5); + lcd.cls(); //printf("%c\n\r",keypad_value); } else if ( (keypad_value==75) ) { ui_settings(); ui_current_screen=1; + lcd.cls(); //wait(5); //printf("%c\n\r",keypad_value); }