Created
October 3, 2018 11:54
-
-
Save li2hub/9176c8d7b8f1cbc6623086d52b78d1e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int thresh=500; | |
void setup(){ | |
Serial.begin(115200); | |
} | |
void loop(){ | |
int val=analogRead(A0); | |
if(val>thresh){ | |
Serial.println("LOW MOISTURE! - Please water the soil"); | |
} | |
else{ | |
Serial.println("Moisture OK"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment