I'm walking through the 'Getting Started with Arduino' book. Just built the circuit for 'using a pushbutton to control an LED'. circuit works fine, but the book doesn't explain why I need the resistor that is in the circuit. the setup is as follows:
pushbutton on breadboard
one side of button goes to the 5v on arduino
other side goes to:
- a 10k ohm resistor, which then goes to GND on the arduino
- pin 7 (input) on arduino
So basically there's a resistor between the output side of the button and the GND on the board. Why is this needed? Does the GND care how much signal comes in? Seems it's a max 5V.
thx!