top of page
De-bouncing a button
We use one button and a resistor. The Arduino can check a button so fast that as you press the button down it will be checked 100's or thousands of times. The button may not have time to make a good connection, this is known as "bouncing". This code try's to filter out the bounce so you get verified button presses.
2.
We set up the button next.
Be sure to use a resistor like shown. A 10k ohm resistor is recommended.
2b.
Use both sides of the bread board, but dont place the button like image below on a bread board.
2
3
3.
We connect the button and resistor to the Arduino pin 2. In this formation the resistor is known as a pull-down resistor.
Code
4.
Software:
We read the button on pin 2. If the button is held down with a good connection the led will light up. but if its not a good press it will not light up.
Note:
Nothing to add here. :D
More Info coming soon!
bottom of page