pump
This commit is contained in:
parent
c3fd0138ac
commit
1f1d0cfafa
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user