Grove - Moisture Sensor inversed signal

I am working in project for greenhouse monitoring, the sensor data sheet says in air the output is 0v and i water the output is 5v. when I leave the sensor in air it reads 5v, and in water it reads 0v, how can i inverse the signal because i am displaying the value in LCD as percentage, and it shows 100% in air.

thanks alot

medo85: I am working in project for greenhouse monitoring, the sensor data sheet says in air the output is 0v and i water the output is 5v. when I leave the sensor in air it reads 5v, and in water it reads 0v, how can i inverse the signal because i am displaying the value in LCD as percentage, and it shows 100% in air.

thanks alot

Not sure why you need to do this, just adjust the code to interpret the signal differently - no need to invert the signal

http://nearbus.net/wiki/index.php?title=Moisture_Sensor

According to this circuit diagram, dry must be 0volt.

Post a picture of the sensor, and how you have connected it. Leo..