loading

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

Video:

https://youtu.be/Iw6rA0cduWg

If you have any questions or problems you can contact me on my mail:iwx.production@gmail.com

So let's begin.

Step 1: Materials

Everything you need for this project you can get on ebay or amazon.

You need:

-2 push buttons

-Arduino Mega 2560 or Uno

-Breadboard

-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

https://www.youtube.com/watch?v=Iw6rA0cduWg

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.

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

About This Instructable

1,089views

6favorites

License:

More by iwoox:Controlling DC motors with Arduino and L293 Make your own development board with microcontroller Arduino simple debounce 
Add instructable to: