3 to 4 rgb led's and learning serial also

Probly a simple question.....im wanting to run 3 common anode 10mm rgb led's from my arduino uno using the the fewest pins I can (or just the most efficient* way). Thinking this is a good time to learn how to use certain serial ic chips with my arduino at the same time. I don't need to control each led individually....Im wanting to fade all led's together from green, to yellow, to red. the reason i'm using 3 to 4 is simply the brightness and the area to be lit. I'm also just plain wanting to learn some simple ic control/communication at the same time being fairly new to the arduino and not order a bunch of wrong stuff. Thank you, Tim

I have ordered some 74hc595 chips to start. Any input/insight would be appreciated.

  • You have 3 pieces of a RGB led Common Anode.
  • The 3 pieces can be switched parralel (all Red tied together, all blue ...etc)
  • You want to fade from green->Yellow->red->

Tie the 3 Anodes to your 5V.
Tie the Red's to a PWM output 2
Tie the Green's to a PWM output 3
Tie the Blue's to a PWM output 4
Make sure you add resistors and your pin's have enough power(current) to control your led's

Now just use analogWrite()'s to control the individual colours

You use 3 pins on the Arduino , its hard to get this lower i think. the guys in "Leds and Multiplexing" can probably do this with half a pin :wink:

Thank you for the reply and clearing that up for me, I was certainly making things alot more complicated in my head for some reason. Think I'll go play with it a bit. :smiley:
Guess I was also looking for a good reason to get off my butt and learn a bit about shift registers too.....another time perhaps. ty again