Little help needed with wiring up a circuit

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 :slight_smile:

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.

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 :slight_smile:

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

FYI (3 ways to wire a switch)

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 :slight_smile:

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.

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 :sweat_smile: