Compare commits

...

2 Commits

2 changed files with 6 additions and 15 deletions

View File

@ -15,7 +15,7 @@ void setup() {
Serial.begin(19200);
digitalWrite(5 , HIGH);
attachInterrupt(0, wakeUp, FALLING);
Serial.println("https://git.sfs.ddnss.org/Erik/garden-watering-controller.git");
}
@ -103,7 +103,6 @@ void wateringTheGarden() {
wait(calculatePumpOnTime() * 1000);
digitalWrite(7, LOW);
digitalWrite(9, LOW);
} else {
Serial.println("Wet enough");
}

View File

@ -2,10 +2,9 @@
void setup() {
pinMode(2, INPUT);
pinMode(A4, INPUT);
pinMode(A2, INPUT);
pinMode(A0, INPUT);
Serial.begin(19200);
float poty;
float dampness;
}
@ -13,14 +12,7 @@ void loop() {
Serial.println(digitalRead(2));
delay(200);
Serial.println(analogRead(A4));
Serial.println(percentage() ,4);
delay(20);
}
float percentage(){
// float poty = analogRead(A2);
//return poty/454;
return analogRead(A4) / 454;
Serial.println(analogRead(A2));
Serial.println(analogRead(A0));
delay(1000);
}