firmware - fix outputs being on at start on CanGrow PCB v0.6

This commit is contained in:
DeltaLima 2024-12-05 04:52:28 +01:00
parent d782cae49a
commit f9914343e7
2 changed files with 9 additions and 6 deletions

View file

@ -61,15 +61,11 @@
void setup() {
// setup pins
pinMode(PinFAN, OUTPUT);
//pinMode(PINdht, INPUT);
pinMode(PINwaterlevel, OUTPUT);
pinMode(PINsoilmoisture, OUTPUT);
pinMode(PinLED, OUTPUT);
pinMode(PinPUMP, OUTPUT);
pinMode(PinWIPE, OUTPUT);
// set all OUTPUT to low
digitalWrite(PINwaterlevel, LOW);
@ -198,6 +194,13 @@ void setup() {
display.clearDisplay();
display.display();
}
// at the end of setup, set the outputs
// we do this here because otherwise on inverted
// boards like CanGrow PCB v0.6 it would be turned on
pinMode(PinLED, OUTPUT);
pinMode(PinPUMP, OUTPUT);
pinMode(PinFAN, OUTPUT);
}

View file

@ -1,5 +1,5 @@
/* CanGrow_Version.h gets generated from cangrow.sh */
const char* CanGrowVer = "0.1-dev";
const char* CanGrowBuild = "8218de1-20241205035359";
const char* CanGrowBuild = "d782cae-20241205044935";