Hi!
I have a question that I'm sure has a simple explanation, but current confuses me.
Let's say I have a power supply that can do 5V @ 10A, and it is powering all sorts of things in my project. One thing I want to have is a pushbutton that I connect to an input pin on the Arduino and poll to send over serial to my PC.
My question is how much current will this use when the button is pressed?
I can think of two ways to wire this up:
-
Digital pin to my +5V power supply. Ground to my button to the digital pin. When I press button, ground goes to pin and pin goes low.
-
Digital pin to ground. +5 power supply to my button to the digital pin. When I press button, +5 goes to pin and pin goes high.
In both cases, these seem like a short to me, and that the full 10A would run through the connection (uh-oh). Do I need a resistor? Do I need a resistor rated to handle 10A? Will I be dissipating tons of power?
What's the right way to do this?