Reading a range using water sensor Question
robert_oheill
Posts: 1
in micro:bit
I have a WaveShare Liquid Water sensor that reads the amount of voltage it generates when dipped in water. It is plugged into pin1 of the analog of the micro:bit board. I have a range of values as an if statement using cyberbot python.
water = pin1.read_analog()
if water <= 400:
bot(0).write_digital(1)
This doesn't work however as when it reads under the range it doesn't perform the commands that follow. I was wondering if I was doing the statement wrong or what because I cannot find the error.
Comments
What is bot (0)