Go Down

Topic: Newbie needs some clarification on RGB led pin-outs (Read 539 times) previous topic - next topic

eosyn

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

JimboZA

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.
Arduino ethernet server here.... http://jimboza.gotdns.com:8085/

No PMs for help please

fungus


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.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

eosyn

Cheers all for the replies! ++faith_in_humanity :)

Go Up