Hi all,
I’m new so if this is not the right place to ask my question please let me know.
Problem: Value on serial monitor don’t change when sensor is in the water.
I have my board with the moisture sensor connected and transfer this provided sketch.
[code]/*
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the Serial Monitor.
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
This example code is in the public domain.
https://arduino.cc/en/Tutorial/AnalogReadSerial
*/
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.println(sensorValue);
delay(100); // delay in between reads for stability
}[/code]
When opening the serial monitor the result is 1024, i think the max value.
But when put in water nothing happens on the monitor.
If i measured on (SIG): analog output the result = “dry”: 2.01 V and “wet”: 1.02V (for me the sensor works if i’m right ?)
The pin(s) i used are for this sensor
On the ESP board i use pin 3V for RED, GND for BLACK, ADC for YELLOW
Could anyone give me some push in the right direction to solve this issue.
Thanks for reading anyway
Best Regards