using 2 button arcades as 'the same button' and 1 pin

Hi all!
I have a question:

I want to use 2 arcade buttons as the same button and being read by the same pin.
What i am trying is just connect both burttons to GND and +5 and the output of both
to my arduino in the same pin. The problem is that doing this the only thing i get when
i press any button is a short circuit and what i whant is read HIGH when any of those
is pressed (or both at same time). i don't wanna know wich one is pressed. just know
when any or both are pressed.

Thanks in advance!!!

Daniel

no clue? :frowning:

Is this a standard 2-pin normally-open switch? If so, I don't understand how you are connecting it to ground, +5V, and an input pin (pull-up/down resistor maybe?) It sounds quite likely that you are indeed causing a short.

A schematic or even a simple sketch of your hookup will be the only way to resolve this properly.

Hi! The buttons are the arcade buttons like the atached picture...
what i am doing is giving both buttons +5 and GND and then tie the outs together and insert it in
my arduino. Pressing any button just shorts the circuit and my arduino resets.

I just want to get a high reading when any of the button is pressed.
thanks in advance!

Daniel

This is my wiring. I know...my drawing skills are awesome :slight_smile:

Daniel

First, you have to set the pin as Input (high impedance). For most controllers that is the default status.

The connection in the picture:

case 1 : No button is pressed. Arduino pin is at 5 V (no voltage drop on resistor since the current has no path to flow).
case 2: 1 button is pressed. Arduino pin is at 0 V . There is a 5V voltage drop on resistor. The current flows from VDD to ground. At a 10kohm resistor you have 0.5 mA.
case 3: 2 buttons are pressed. Arduino pin is at 0 V . There is no voltage drop on the resistor. (no closed circuit).

If you put no resistor/low resistance resistor then you make a short circuit and bad things might happen. with 10k - 50 k resistance resistor you are safe as long as the Arduino Pin is set as high impedance (input pin)

Good luck.

Hi Calin.
I've declared the pin as INPUT, but when i press any button my arduino resets just like
a common short circuit :frowning:

eldany:
Hi Calin.
I've declared the pin as INPUT, but when i press any button my arduino resets just like
a common short circuit :frowning:

What resistor did you use? Say the colors if you don't know the value :smiley:

Also, which pin did you use as input? Which micro controller? Do you have a multimeter around?

Hi Calin. I didn't used any resistor.
I'm not a home but if you tell me how would you do this (wich resistor, where and wich pin
would you use) i can test it and let you know the results.

Thank you very much!!!

Daniel

eldany, check CalinTamaian's post where he posted a schematic. Copy that and you will be fine, all the info you need is in his post there. Any un-used digital input pin will be fine. Like has been stated, without a resistor, your are directly hooking 5V to GND when one switch is closed, which is the short circuit you are seeing.

CalinTamaian and Madmatt THANK YOU!!!!

You made my day :slight_smile:
The trick where in that resistor.
Love ya!

Thanks again

Daniel

Now go add 2 more buttons and play something in multiplayer ....

:slight_smile: