From 1f1d0cfafa8c887d0448265c9bbe4dab095638f4 Mon Sep 17 00:00:00 2001 From: cd109876 Date: Wed, 8 May 2019 13:32:08 -0500 Subject: [PATCH] pump --- Greenhouse.ino | 3 +++ 1 file changed, 3 insertions(+) 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();