Pages: [1]   Go Down
Author Topic: [Arduino Uno] How to control the other LEDs besides led 13?  (Read 1710 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there,

On the blink example code you can control the LED 13. But on the Arduino Uno board there are more LEDS. How do you control the other LEDs besides LED 13?

Thanks in advance. Regards
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 54
Posts: 1848
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The TX and RX leds are used when data is being transmitted through the USB port.  Quoting from the description of the UNO:

Quote
The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB-to-serial chip and USB connection to the computer (but not for serial communication on pins 0 and 1).

So, if you do Serial.print/Serial.println it should flash the TX light.  If the host sends you data that you read with Serial.read, then the RX light should be lit.

The 4th led is the power light.  It is on if the board has power.

If you want any other LEDs, you have to add them yourself.  Be sure to use appropriate resistors on LEDs, or else you might burn out the LED or damage your UNO.  Here is an example that shows how to wire up a LED: http://arduino.cc/en/Tutorial/Fade.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you. I just added a LED on Pin 3 - but without a resistor. It works fine though it shines very bright.  :o

I've got a 220 Ohm resistor. But it doesn't look like the one you posted in the link (brown-red-black on a light brown resisitor). My resistor is kinda blue with black stripes. But it says it's 220 Ohm. What besides the color are the differences between the two?

Does the orientation of the resistor matter?
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 54
Posts: 1848
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you. I just added a LED on Pin 3 - but without a resistor. It works fine though it shines very bright.  :o

And eventually it will burn out, unless you have a LED with a built-in resistor.

I've got a 220 Ohm resistor. But it doesn't look like the one you posted in the link (brown-red-black on a light brown resisitor). My resistor is kinda blue with black stripes. But it says it's 220 Ohm. What besides the color are the differences between the two?

There is an international color code for resistors.  It doesn't sound like what you have is 220 Ohms.  Here is the wikipedia site for the color code: http://en.wikipedia.org/wiki/Electronic_color_code

You can also get smartphone apps that have the color code chart.  I keep hoping some day there will be a usable app for Android phones that can use the camera and tell you what the bands say, as I have some amount of color blindness, and I have a hard time telling some colors apart (typically orange and brown).

Does the orientation of the resistor matter?

For resistors, it does not matter.  It does matter for LEDs.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It doesn't sound like what you have is 220 Ohms.
It is. 220(+-1%) Ohm.

It's a very accurate one at that since it got 5 rings. And I tried.
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 54
Posts: 1848
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If it says it is 220 ohms, then I would say use it.  The point of the resistor is to limit current so that you don't burn out the LED.  If you want the maximum brightness that a LED can deliver safely (or a particular) brightness, you would need to use a LED resistance calculator.  I suspect most people playing with Arduino's just use either 220 ohm or 330 ohm resistors and it will be good enough.
Logged

Pages: [1]   Go Up
Jump to: