Arduino Simple Debounce




Introduction: Arduino Simple Debounce

About: Student at Faculty of Electrical Engineering and Computer Science. ...

This instructable is about how to make easy debounce with 2 push buttons.All you need is basic knowledge in electronics and arduino programming.


If you have any questions or problems you can contact me on my

So let's begin.

Step 1: Materials

Everything you need for this project you can get on

Sponsor Link:

It is a trustworthy webside for ordering electronic components with cheap price and excellent quality.

You need:

-2 push buttons

-Arduino Mega 2560 or Uno


-Some wires

-2 LED´s(green and red) if you want you can choose other colors

-two 10k ohm resistors

-and of course computer.

Step 2: Watch a Video

You can also see how this project is working

Step 3: Wiring

This project is very easy to connect because there isnt a lot of electronics components.

-push button (ON) is connected to digital pin 2

-push button (OFF) is connected to digital pin 3

-green LED is connected to digital pin 5

-red LED is connected to digital pin 4

You just need to be careful that you connect 10k ohm resistors between GND and push button pin.(look circuit picture)

Step 4: Code

This code is very easy to make and understand.

It is working like that.

-When you hit ON push button, variable x state change to 1, stays there until you hit OFF button and green LED turn on.

-When you hit OFF push button, variable x state change back to 0, stays there until you hit ON button again and red LED turn on.

Just download it, plug in Arduino and upload code.

Be the First to Share


    • Pocket-Sized Speed Challenge

      Pocket-Sized Speed Challenge
    • Audio Challenge 2020

      Audio Challenge 2020
    • Maps Challenge

      Maps Challenge


    Jesper K.P
    Jesper K.P

    3 years ago

    Not a de-bounced button, more similar to making a set/reset PAIR of buttons.
    Do not use this as a source for learning about de-bouncing.