control works again (fixed with wifi and fallback)

This commit is contained in:
Your Name
2021-05-24 14:58:35 +02:00
parent ad0ae88c3c
commit 92005c1c33
3 changed files with 91 additions and 69 deletions

View File

@@ -44,8 +44,14 @@ void Plant::init(void)
});
/* Initialize Hardware */
Serial.println("Set GPIO mode " + String(mPinPump) + "=" + String(OUTPUT));
Serial.flush();
pinMode(this->mPinPump, OUTPUT);
Serial.println("Set GPIO mode " + String(mPinSensor) + "=" + String(ANALOG));
Serial.flush();
pinMode(this->mPinSensor, ANALOG);
Serial.println("Set GPIO " + String(mPinPump) + "=" + String(LOW));
Serial.flush();
digitalWrite(this->mPinPump, LOW);
}