Go Down

Topic: Little help needed with wiring up a circuit (Read 346 times) previous topic - next topic

MarioYellow

I've laid down 10 pushbuttons onto the breadboard, but i'm unsure about something

Do i need to add resistors even if theres only buttons or is it unneccesary?

I plan to wire the buttons to ground and to one of the digital pins, to read input from them. Nothing else
Although, i have a feeling that not using resistors would short the Arduino, from directing back the same amount of voltage into ground (5v to gnd)

But i don't really know wether or not this is true or something else. So this is why i wanted to ask for (a bit more professional) help here  :)

alesam

The recommended way is to connect buttons like showed here -



You can omit resistors and Vcc connection and use internal pull-ups instead. But original solution is more reliable.

Paul_KD7HB

I've laid down 10 pushbuttons onto the breadboard, but i'm unsure about something

Do i need to add resistors even if theres only buttons or is it unneccesary?

I plan to wire the buttons to ground and to one of the digital pins, to read input from them. Nothing else
Although, i have a feeling that not using resistors would short the Arduino, from directing back the same amount of voltage into ground (5v to gnd)

But i don't really know wether or not this is true or something else. So this is why i wanted to ask for (a bit more professional) help here  :)
No resistors needed if you set each input pin to input-pullup. But your statement "I plan to wire the buttons to ground and to one of the digital pins" concerns me. You need EACH button switch to a separate input pin.

Paul

larryd

No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

jackthom41

#4
Jan 18, 2019, 02:25 am Last Edit: Feb 07, 2019, 06:35 am by jackthom41
I've laid down 10 pushbuttons onto the breadboard, but i'm unsure about something

Do i need to add resistors even if theres only buttons or is it unneccesary?

I plan to wire the buttons to ground and to one of the digital pins, to read input from them. Nothing else
Although, i have a feeling that not using resistors would short the Arduino, from directing back the same amount of voltage into ground (5v to gnd)

But i don't really know wether or not this is true or something else. So this is why i wanted to ask for (a bit more professional) help here  :)
There's no need to add the resistor. Simply connect GND to one side of all your buttons and the other side of each button will be connected to digital pins of Arduino. Now in your code use pinMode Arduino Command: pinMode(Pin#, INPUT_PULLUP); and it will work perfectly fine.

When you press the button, the respective pin of Arduino will get LOW, and when you release it, the pin will get HIGH.
My collection of Arduino Projects ====> https://www.theengineeringprojects.com/2015/03/arduino-projects.html

MarioYellow

Quote
But your statement "I plan to wire the buttons to ground and to one of the digital pins" concerns me. You need EACH button switch to a separate input pin.

Paul
Yeah, i meant that, just said it wrong
My bad  :smiley-sweat:

Go Up