int soilPin = A0;
int soilValue;
void setup() {
Serial.begin(9600);
}
void loop() {
soilValue = analogRead(soilPin);
Serial.print("Soil Moisture Value: ");
Serial.println(soilValue);
delay(1000);
Copyright ⓒ TECH79 All right reserved