Compare commits
No commits in common. "b3e2d861d9e270aa824fe95398475454c2fbe6f9" and "373ea07fff473865b519efab51f87ec535460467" have entirely different histories.
b3e2d861d9
...
373ea07fff
@ -15,7 +15,7 @@ void setup() {
|
|||||||
Serial.begin(19200);
|
Serial.begin(19200);
|
||||||
digitalWrite(5 , HIGH);
|
digitalWrite(5 , HIGH);
|
||||||
attachInterrupt(0, wakeUp, FALLING);
|
attachInterrupt(0, wakeUp, FALLING);
|
||||||
Serial.println("https://git.sfs.ddnss.org/Erik/garden-watering-controller.git");
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -103,6 +103,7 @@ void wateringTheGarden() {
|
|||||||
wait(calculatePumpOnTime() * 1000);
|
wait(calculatePumpOnTime() * 1000);
|
||||||
digitalWrite(7, LOW);
|
digitalWrite(7, LOW);
|
||||||
digitalWrite(9, LOW);
|
digitalWrite(9, LOW);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Serial.println("Wet enough");
|
Serial.println("Wet enough");
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,10 @@
|
|||||||
void setup() {
|
void setup() {
|
||||||
pinMode(2, INPUT);
|
pinMode(2, INPUT);
|
||||||
pinMode(A4, INPUT);
|
pinMode(A4, INPUT);
|
||||||
pinMode(A2, INPUT);
|
|
||||||
pinMode(A0, INPUT);
|
|
||||||
Serial.begin(19200);
|
Serial.begin(19200);
|
||||||
|
float poty;
|
||||||
|
float dampness;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12,7 +13,14 @@ void loop() {
|
|||||||
Serial.println(digitalRead(2));
|
Serial.println(digitalRead(2));
|
||||||
delay(200);
|
delay(200);
|
||||||
Serial.println(analogRead(A4));
|
Serial.println(analogRead(A4));
|
||||||
Serial.println(analogRead(A2));
|
Serial.println(percentage() ,4);
|
||||||
Serial.println(analogRead(A0));
|
delay(20);
|
||||||
delay(1000);
|
}
|
||||||
|
|
||||||
|
float percentage(){
|
||||||
|
|
||||||
|
// float poty = analogRead(A2);
|
||||||
|
//return poty/454;
|
||||||
|
return analogRead(A4) / 454;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user