Compare commits
2 Commits
373ea07fff
...
b3e2d861d9
Author | SHA1 | Date | |
---|---|---|---|
b3e2d861d9 | |||
9c46729c59 |
@ -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");
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user