...I'm baffled... I could understand some bouncing... but that is weird...
falling is definitively the right thing with your circuit setup. Worst case you have to do some 'debouncing' yourself... using fuzzy logic...
In our case you get a rapid sequence of ons and then nothing for a while... if you just take the first one and ignore all others within a particular time frame. Not an elegant solution, but it may work, since you know that it is a wheel that can run only within a particular speed range.
Debouncing is not an easy thing, as other users noticed in their conversations: here (1) and here (2).
© Espruino, powered by microcosm.
Report a problem