ive followed about three debouncing tutorials and am finding that the solutions work MOSTLY. that is, about 6 /10 times i press my pushbutton, i only get one response (desired). but quite often it responds two or three times or even more.
does debouncing have this problem inherently? or for you does it only respond once when you press your button? also, does debouncing handle if you HOLD the button down for a brief moment?
basically to get only one response i need to tap the button extremely quickly.
any ideas?
thanks,
marco.
ps. ive just tried the tutorial found in the arduino tutorials. ive tried other tuts that use "delay". just curious to know if debouncing is a solid solution or if i should expect error.
just curious to know if debouncing is a solid solution or if i should expect error.
Yes when it is right it is a solid solution. Contact bounce is a physical phenomenon, you remove it by in effect blanking out the switch for a period of time after a transition. As you have seen this can be done in hardware or software or a mixture of both.
The trick is to blank out the switch for just long enough to cover the bounce, any longer and the switch will not respond as fast any shorter and you risk getting the occasional bounce through.
thanks for all your help guys. I decided to try the Bounce library and found it to work perfectly. So clearly I was not understanding the process or at least it was not working for me. Anyhow, the Bounce library is my friend and I will keep it handy.