diff --git a/Greenhouse.ino b/Greenhouse.ino index 918d2e1..87bea66 100644 --- a/Greenhouse.ino +++ b/Greenhouse.ino @@ -457,6 +457,8 @@ void checkBat() { void runWater() { drawButton(0, 20, 320, 220, "Watering! Please wait.", ILI9341_WHITE); upd = true; + pinMode(7, OUTPUT); + digitalWrite(7, HIGH); getMoisture(); if(s1 && map(soil1.touchRead(0), 0, 1023, 0, 100) <= 50) { int td = 50 - map(soil1.touchRead(0), 0, 1023, 0, 100); @@ -498,6 +500,7 @@ void runWater() { delay(td * 100); digitalWrite(5, HIGH); } + digitalWrite(7, LOW); } void getMoisture() { float h = dht.readHumidity();