This is an Instructable 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:
A push button switch
1 Resistor (any value), I used a 220 ohm one.
2 Jumper cables(breadboard jumpers)
1 Breadboard (to make it easy)
Connect the other corresponding terminal to Gnd. The corresponding terminal is usually on the same side as the first one.
int d=2; // to store on or off value
Step 5: You Are Done!!
Now just press the switch and the LED will light up!