Skip to content

Commit

Permalink
grove_water_sensor:Fixing detection logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
is-qian committed Oct 25, 2024
1 parent 8f4a88d commit 8899b8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grove/grove_water_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def main():
print('Detecting ...')
while True:
value = sensor.value
if sensor.value > 800:
if sensor.value < 200:
print("{}, Detected Water.".format(value))
else:
print("{}, Dry.".format(value))
Expand Down

0 comments on commit 8899b8e

Please sign in to comment.