Hi
I'm new to arduino.
I've do a connection like in photo attached.
Power supply is 12 V.
the result is 99.88% in all cases so doesn't change if I put it in the water or not.
Please help me to solve that.
the code is simple,
const int sensorPin=A0;
void setup() {
Serial.begin(9600);
}
void loop() {
float sensorValue = analogRead(sensorPin);
float Result;
Result = ((sensorValue-204.0)*100.0)/(1024.0-204.0);
if(Result>0)
{
Serial.print("Sensor Output:");
Serial.print(Result);
Serial.println(" %");
}
else
{
Serial.println("Sensor Error");
}
delay(200);
}