Pages: [1]   Go Down
Author Topic: Newbie needs some clarification on RGB led pin-outs  (Read 326 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello all,
   This is my first posting to the Arduino forum. I have a couple Arduino UNOs and I'm still doing the baby steps and having all kinds of fun with LEDS of the usual two pin variety but now I'd like to tinker with the common RGB led that has 4 pins. The pinout I've gotten to work is like..



Image from mbeckler.org

I see that the 'common' lead is the + Anode and all the color leads are the - Cathodes.
In my little head, I'd normally wire the Anode to a PWM outlet and the Cathode to ground. Sure enough, when I do this, I can light one led on the RGB, or all of them at once if I route all the color pins to ground but I'm wondering, how can I build a circuit that controls the rgb leads if they are going straight to ground? Or at least intelligently control them. All of the examples I see everywhere treat their RGB leds as the complete reverse and mine simply do not run this way.

I'm sure it this is probably easy but I'm a bit perplexed.  Can I use pins 9,10,11 (on the UNO) as variably negative pins?

Feel free to ask questions, photos, diagrams anything I can help with.
Thanks in advance,
eosyn aka Dave
Logged

Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This Adafruit tutorial explains what to do. Although the tutorial shows a common cathode RGB LED, it explains how to wire and code a common anode one. Your idea of negative pins is not far off the mark as you'll see in the note on the page where the code is.
Logged

Retired from Arduino.
PMs are set to ignore all.

Valencia, Spain
Online Online
Faraday Member
**
Karma: 119
Posts: 4591
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can I use pins 9,10,11 (on the UNO) as variably negative pins?

Yes.

When an Arduino pin is "LOW" it's connected to ground.
Logged

No, I don't answer questions sent in private messages...

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

Cheers all for the replies! ++faith_in_humanity smiley
Logged

Pages: [1]   Go Up
Jump to: