add some debug logs

This commit is contained in:
Lukas Heiligenbrunner 2020-11-14 21:21:22 +01:00
parent 337c65daf3
commit 92e7089aef
2 changed files with 12 additions and 4 deletions

View File

@ -19,10 +19,10 @@ void Heating::init(Temperature *tempsensor) {
Serial.print("humidity read: "); Serial.print("humidity read: ");
Serial.println(hum); Serial.println(hum);
if (hum > 65) { if (hum > 65.0) {
// turn off active turnoff timers // turn off active turnoff timers
mLuefterTicker.detach(); mLuefterTicker.detach();
Serial.println("heating should run now!");
// turn on heating and fan // turn on heating and fan
digitalWrite(LuefterPin, HIGH); digitalWrite(LuefterPin, HIGH);
digitalWrite(HeizungPin, HIGH); digitalWrite(HeizungPin, HIGH);
@ -32,10 +32,10 @@ void Heating::init(Temperature *tempsensor) {
mLuefterTicker.detach(); mLuefterTicker.detach();
mFanWaiting = false; mFanWaiting = false;
} }
} else if (hum < 60) { } else if (hum < 60.0) {
// if humidity too low turn off heating and fan after 60secs // if humidity too low turn off heating and fan after 60secs
digitalWrite(HeizungPin, LOW); digitalWrite(HeizungPin, LOW);
Serial.println("heating should NOT run now!");
if (!mFanWaiting) { if (!mFanWaiting) {
mFanWaiting = true; mFanWaiting = true;
mLuefterTicker.once(60, []() { mLuefterTicker.once(60, []() {

View File

@ -149,6 +149,9 @@ void setup() {
digitalWrite(SchuetzPin, LOW); //pumpe anfangs sofort abschalten digitalWrite(SchuetzPin, LOW); //pumpe anfangs sofort abschalten
digitalWrite(LuefterPin, LOW); digitalWrite(LuefterPin, LOW);
digitalWrite(HeizungPin, LOW); digitalWrite(HeizungPin, LOW);
//
// digitalWrite(HeizungPin, HIGH);
// delay(1000000);
// initilize serial connection // initilize serial connection
Serial.begin(9600); Serial.begin(9600);
@ -177,10 +180,15 @@ void setup() {
// initialize wifi // initialize wifi
Serial.println("initializing temperature sensor!");
temp.init(); temp.init();
Serial.print("initial read temperature: ");
Serial.println(temp.getTemp());
Serial.println("Initializing wifi");
mang.init(&temp); mang.init(&temp);
Serial.println("initializing heating service");
mHeat.init(&temp); mHeat.init(&temp);
Serial.println("startup sequence complete!\n"); Serial.println("startup sequence complete!\n");