Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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