Skip to content
Snippets Groups Projects
Commit 637b58e0 authored by 13515029 - Finiko Kasula Novenda's avatar 13515029 - Finiko Kasula Novenda
Browse files
parents a1c4fc81 d5705914
Branches
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ void loop() {
Serial.print("Soil Moisture = ");
Serial.println(readSoil());
if (readSoil() < 900) {
if (readSoil() > 60) {
Serial.println("wet soil");
digitalWrite(ledPin, LOW);
} else {
......@@ -49,6 +49,6 @@ int readSoil() {
delay(10);
val = analogRead(soilPin);
digitalWrite(soilPower, LOW);
return val; //send current moisture value
return val/1023*100; //send current moisture value
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment