Pages: [1]   Go Down
Author Topic: Connecting a simple arcade button  (Read 557 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: February 04, 2013, 07:36:58 am by cweyer » Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 65
Posts: 3638
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: