I have a sketch running a couple of continuous rotation servos. I'm using one of them to control an object back and forth using string around a pulley, and microswitches as endpoints to make it change direction - this works perfectly.
As this will be running unattended, I want to have a failsafe function implemented, f.ex. "if microswitch left/right hasn't been clicked in the last two minutes, freeze sketch".
Is this possible?
It's just as a failsafe IF one of the microswitches were to fail, or any other strange hick-up, the string will most likely just skip around the pulley, with the obvious wear and tear.
How can I count since last input from 10 or 11? Or any input for that matter (it's the only ones).