Debounce an input using Arduino

This example demonstrates how to debounce an input, which means checking twice in a short period of time to make sure it's definitely pressed. Without debouncing, pressing the button once can appear to the code as multiple presses. Makes use of the millis() function to keep track of the time when the button is pressed. Circuit image developed using Fritzing. For more circuit examples, see the ...

Read more
Scroll to top