Go Down

Topic: Connecting a simple arcade button (Read 659 times) previous topic - next topic

cweyer

Feb 04, 2013, 01:02 pm Last Edit: Feb 04, 2013, 01:36 pm by cweyer Reason: 1
At the moment, I’ve got an Arduino Uno and a basic arcade button. I’m trying to wire the arcade button to the Uno so that when pressed it can turn the LED on the board on.
I've wired one end of the buttons to pin 2 and the other to GND and am just trying to run some test code so that if the button is pressed then turn the led on the board on. Haven't had any luck in getting it working yet, do i need a resistor for this circuit or should it work without?

wildbill

You certainly need a resistor (unless the switch has one somewhere) otherwise pressing the button will short pin 2 and damage it. Use the internal pullups the arduino provides. See  INPUT_PULLUP on this page http://arduino.cc/en/Reference/PinMode

Go Up