I want calculate analog values from Capacitive Soil Moisture Sensor SKU:SEN0193 to percentage. pls help me. Thank you.

https://www.dfrobot.com/wiki/index.php/Capacitive_Soil_Moisture_Sensor_SKU:SEN0193

I want calculate analog values from Capacitive Soil Moisture Sensor SKU:SEN0193 to percentage. pls help me. Thank you.

https://www.dfrobot.com/wiki/index.php/Capacitive_Soil_Moisture_Sensor_SKU:SEN0193

The linked web page has the recipe to get that calculation done. Have you done the measurement in dry air and inside the water? What values did you get? If you insert that in the second test code you get the expected result. Where is the problem?

I think OP expects to see a percentage. Not just "Very Wet", "Wet", and "Dry". Leo..

I think OP expects to see a percentage. Not just "Very Wet", "Wet", and "Dry".

The recipe describes how to get the measurement for 100% and for 0%. Dividing the difference by 100 to get the increment for 1 percent shouldn't need that much mathematical knowledge. So I still don't see the problem. Please describe.