const int moistureSensorPin = A0; // Signal pin of the moisture sensor
const int ledPin = 13; // LED connected to pin 8
const int moistureThreshold = 1; // Adjust based on testing
void setup() {
Serial.begin(9600); // Start Serial Monitor
pinMode(ledPin, OUTPUT); // Set LED pin as output
pinMode(moistureSensorPin, INPUT); // Set sensor pin as input
}
void loop() {
int moistureValue = analogRead(moistureSensorPin); // Read sensor value
Serial.print("Moisture Value: ");
Serial.println(moistureValue); // Print sensor value for debugging