
Push buttons don’t give a clean on/off signal to a microcontroller. The value bounces around a little, which can cause a program to see a whole string of button presses instead of one.
There are lots of techniques to clean up the signal and ‘debounce’ the button, both in hardware and software. Hack a Day gathered examples of debounce code in one-post-to-rule-them-all.
These came in handy when we added support for the function button on Bus Pirate v4.
