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.
Revision 42:41f6c241a987, committed 2014-04-14
- Comitter:
- umairaftab
- Date:
- Mon Apr 14 04:15:33 2014 +0000
- Parent:
- 41:f484ea386062
- Child:
- 43:cf893fa88690
- Commit message:
- Peltier Temp bug 2.0 test
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
peltier/peltier.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Apr 14 04:02:31 2014 +0000 +++ b/main.cpp Mon Apr 14 04:15:33 2014 +0000 @@ -32,6 +32,9 @@ #include "cycleair.h" #include "cycleair_pindef.h" +#include "DS18B20.h" +#include "OneWireDefs.h" + #include <string> using namespace std; @@ -480,9 +483,9 @@ lcd.locate(0,0); lcd.printf("Find Pelt Temp Sense"); - tempinit(); - peltierin_temp = dsen_temp_in; - peltierout_temp = dsen_temp_out; + //tempinit(); + //peltierin_temp = dsen_temp_in; + //peltierout_temp = dsen_temp_out; wait(2); lcd.cls(); @@ -659,6 +662,23 @@ lcd.locate(0,1); lcd.printf("Pelt Functions"); wait(2); + //lcd.cls(); + //wait(5); + + lcd.cls(); + lcd.locate(0,0); + lcd.printf("Find Pelt Temp Sense"); + + tempinit(); + peltierin_temp = dsen_temp_in; + peltierout_temp = dsen_temp_out; + + wait(2); + lcd.cls(); + lcd.locate(0,0); + lcd.printf("Find Pelt Temp Sense"); + lcd.printf("Found Them"); + wait(2); lcd.cls(); pelt_first_time = false ;
--- a/peltier/peltier.cpp Mon Apr 14 04:02:31 2014 +0000 +++ b/peltier/peltier.cpp Mon Apr 14 04:15:33 2014 +0000 @@ -93,7 +93,10 @@ // lcd.locate(0,0); // lcd.printf("Family code: 0x%X\n\r", ROM_Code.BYTES.familyCode); // wait(5.0); - + bool read_temp_flag = true; + if( fan_in==false && fan_out==false && cold == false && hot==false){ + read_temp_flag = false; + } en_drv1=0;//disable en_drv2=0;//disable fan_in_peltier=0;//disable @@ -123,11 +126,13 @@ peltier_hot_pulsewidth=pwm_procent*10; peltier_hot.pulsewidth_us(peltier_hot_pulsewidth); } - + + if(read_temp_flag){ readTemp(1); dsen_temp_in=temp; readTemp(0); dsen_temp_out=temp; + } printf("inside Temp is %2.1fC, outside temp plate is %2.1fC\n\r", dsen_temp_in,dsen_temp_out); //lcd.cls(); // lcd.locate(0,1);