I hooked it up to 3.3v, gnd and connected the analog output to a0. Unfortunately I only get 1024 out of it, weather it's dry or completely submerged in water. When I use it on a arduino, I get the whole range of values from 0 to 1024
The sketch I'm using can't be simpler:
void setup() {
Serial.begin(9600);
pinMode(A0, INPUT);
}
void loop() {
Serial.println(analogRead(A0));
delay(100);
}
Any idea where Im'n going wrong? The only thing I can think of is that the arduino powers the sensor with 5.5v, while with the ESP I'm powering it with 3.3v