This is an Tutorial that tells you how to connect a 4 pin push button switch with the Arduino. The contraption allows an LED to be switched on when the push button is pressed.
Step 1: What You Need:You need:
- A push button switch
- Arduino
- 1 Resistor (any value), I used a 220 ohm one.
- 2 Jumper cables(breadboard jumpers)
- 1 Breadboard (to make it easy)
- LED
Put the switch in the breadboard and put an LED with the longer end into pin 13 and shorter end to the GND of the Arduino.
Step 3:Put the resistor with one end in +5 V and the other end connected with one of the terminals of the switch. Connect the other corresponding terminal to Gnd. The corresponding terminal is usually on the same side as the first one.
Step 4:Connect the first terminal (the one with the resistor) to pin 2 on the Arduino and load the program.
Now just press the switch and the LED will light up!
Comments