From f9914343e7f23be67a96595d1d71aebe692b1337 Mon Sep 17 00:00:00 2001 From: DeltaLima Date: Thu, 5 Dec 2024 04:52:28 +0100 Subject: [PATCH] firmware - fix outputs being on at start on CanGrow PCB v0.6 --- Arduino/CanGrow/CanGrow.ino | 13 ++++++++----- Arduino/CanGrow/CanGrow_Version.h | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Arduino/CanGrow/CanGrow.ino b/Arduino/CanGrow/CanGrow.ino index ba04e03..9659204 100644 --- a/Arduino/CanGrow/CanGrow.ino +++ b/Arduino/CanGrow/CanGrow.ino @@ -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); } diff --git a/Arduino/CanGrow/CanGrow_Version.h b/Arduino/CanGrow/CanGrow_Version.h index 547896d..ed23ee4 100644 --- a/Arduino/CanGrow/CanGrow_Version.h +++ b/Arduino/CanGrow/CanGrow_Version.h @@ -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";