Dynamic Timer Logic
Posted: Mon Feb 20, 2017 8:44 pm
Hello,
I am trying to sound an alarm whenever my laser/lightsensor is blocked for more than 60 seconds. What might this logic look like?'
I haven't been able to make a while loop work with and if and a sleep command.
I need it to be something like:
if sensor is blocked, count 60 seconds and sound the alarm.
However, I need the value of the lightsensor to be able to reset the counter.
Thanks for your direction!
biosboy4
I am trying to sound an alarm whenever my laser/lightsensor is blocked for more than 60 seconds. What might this logic look like?'
I haven't been able to make a while loop work with and if and a sleep command.
I need it to be something like:
if sensor is blocked, count 60 seconds and sound the alarm.
However, I need the value of the lightsensor to be able to reset the counter.
Thanks for your direction!
biosboy4