playing around
This commit is contained in:
parent
af0f7715bf
commit
e9abdeb283
1 changed files with 18 additions and 1 deletions
|
@ -34,6 +34,9 @@ uint8_t PINwaterlevel = D7;
|
|||
uint8_t PINsoilmoisture = D8;
|
||||
uint8_t PINanalog = A0;
|
||||
|
||||
int D6status = false;
|
||||
|
||||
|
||||
#define WIRE Wire
|
||||
#define DHTTYPE DHT11
|
||||
|
||||
|
@ -306,7 +309,21 @@ void loop() {
|
|||
display.display();
|
||||
|
||||
Serial.println("Test");
|
||||
delay(1000);
|
||||
|
||||
if(getWaterlevel() < 2) {
|
||||
digitalWrite(PINled, LOW);
|
||||
digitalWrite(PINpump, LOW);
|
||||
digitalWrite(PINfan, LOW);
|
||||
D6status = false;
|
||||
Serial.println("D6 is off now");
|
||||
} else {
|
||||
digitalWrite(PINled, HIGH);
|
||||
digitalWrite(PINpump, HIGH);
|
||||
digitalWrite(PINfan, HIGH);
|
||||
D6status = true;
|
||||
Serial.println("D6 is ON now");
|
||||
}
|
||||
delay(100);
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue