I'm getting this from the "Getting Started with Ardunio" Book by makershed.
This diagram is throwing me off, and I'm hoping you guys can clear it up.
http://imgur.com/oRFZT
1) Why are we using a resistor for the switch?
2) If we Need the resistor, does it matter where the resistor is placed in the circuit? Shouldn't it be on the 5V side, before the switch?
3) Does the wire with the red arrow benefit from the resistor?
4) Shouldn't we be using a resistor for the LED?
Thanks!
Is this diagram stupid, or am I crazy?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Is this diagram stupid, or am I crazy?
The resistor is a pull-down. It keeps the digital pin low until you push the button, which connects 5V to the digital pin and pulls it high. While it's not the "wrong" way to do it, most people usually use the internal pull-up on the digital pins, and have the switch short to GND.
Digital 13 is a special case - it already has the current-limiting resistor for the LED built-in.
Digital 13 is a special case - it already has the current-limiting resistor for the LED built-in.
- westfw
- Posts: 2008
- Joined: Fri Apr 27, 2007 1:01 pm
Re: Is this diagram stupid, or am I crazy?
Not on any recent version of Arduino... If you already have a pin13 LED on the board, then you DON'T have a current-limiting resistor leading to the connector. That dates back to pre-diecimilla days.Digital 13 is a special case - it already has the current-limiting resistor for the LED built-in.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Is this diagram stupid, or am I crazy?
Ah… thanks!westfw wrote:That dates back to pre-diecimilla days
Please be positive and constructive with your questions and comments.