grove.py icon indicating copy to clipboard operation
grove.py copied to clipboard

grove water sensor example seems incorrect?

Open jaydeep987 opened this issue 4 years ago • 1 comments
trafficstars

I tried to follow grove water sensor example shown in https://github.com/Seeed-Studio/grove.py/blob/master/grove/grove_water_sensor.py The below condition is opposite in my case:

if sensor.value > 800:
            print("{}, Detected Water.".format(value))
        else:
            print("{}, Dry.".format(value))

It prints >800 Detected water when sensor is not in water and prints <800 Dry when sensor is in water..

Is that expected ?

jaydeep987 avatar Mar 13 '21 14:03 jaydeep987

This is because the resistance drops after contact with water, resulting in such data feedback

Chunchun-tian avatar Apr 09 '21 03:04 Chunchun-tian