7-color RGB LED Help

I bought a 3 legged Blinking (I have a theory this might be my problem) RGB LED from Radio Shack. I am not quite sure on how to code my arduino to make it emit one solid color constantly.

The closest I have gotten was by restricting the flow of voltage to the LED via resistors but it seems a little bit inefective. I have looked on the interent to find coding examples but winding up with results that do not match my problem.

I wou ld like to be able to control the color by means of coding, I am just not sure of how to code it.

Any help, coding or pointing me in the right direction is appreciated.

Can you link to the item in question? If it was advertised as a "Blinking LED" then it's likely it is a small module that is set up to blink as standard (i.e. you don't have to toggle power)

If what you have is something like this Radio Shack Blinking LED then I think this may be the case. If you need to have more control over things then I would simply buy a standard RGB LED.

EDIT - just found this manual (actually written by someone who experimented a bit with them - the practically useless datasheet is here) with operation instruction linked to from one of the comments. It seems it can be toggled through various modes (including continuous on) by switching the mode pin to ground.
Here is an example circuit from the manual:

The "manual" says you must use a low enough value resistor to prevent the LED continually resetting. See the last page of the manual, apparently this happens when run under ~10mA, so make sure you are running above this.
It says on power up it should cycle through the colours 4 times then stop with red LED lit.

I would aim for between 15mA and 25mA.
The LED typical forward voltage is 3.2V, so if you are running it from a 9V supply and want 20mA, use a (9V - 3.2V) / 0.025A = 290Ω (270Ω or 300Ω will do)
For a 5V supply, you would use (5V - 3.2V) / 0.020A = 90Ω (100Ω or 82Ω will do)

If it still won't work, post a picture/schematic of your setup with supply voltage and resistor value.

• The LED in the picture is the one I am referring to. I have tried puting the mode pin to ground and the LED does cycle through the colors. But this does not adress the issue im afraid. Lets say I want the LED to display the color orange and i want it to stay orange. I am not quite sure how to code my arduino to display the color orange with this LED. I would prefer not to have to buy another RGB LED if possible. Aug 26, 2012 at 15:32
• @GataKareb - see edits to answer, let me know how it goes. Aug 26, 2012 at 16:18
• I wonder if anyone makes RGB+controller devices which use a clocked-data controller rather than an automatic animation thingie. If manufacturers can do the latter, they should be able to do the former. Jul 16, 2013 at 16:16

I have seen what sounds like what you have. A "7 color 3 pin led". Check LEDhoops or youtube this: 7color hula hoop tutorial by Christopher black. Hope this helps.

• I just checked Arduino forum and found a listing of the Arduino code I think you are look8ng for. Luck Apr 10, 2017 at 19:30