So recently I have been trying to make some videos for my youtube channel and in the process, it has led me to design and make various props for certain scenes and shots. For some more advanced kinds of props than what ive normally made, I have obtained a Seeed Motor Shield and SD Card Shield to go with my Uno R3 board. The potential props i can make are greater now, but I have hit a snag when it comes to certain components.
Around the same time I had my Uno R3 board, I also possessed a 7-Color 4-Pin LED Diode, as shown in the provided image. What i want to do with it is to make it gradually change from one color to the next and so on. At best, this diode would be used for a kind of flashlight/lightsource kind of thing. I got it from RadioShack, but its been a while since I bought it and i have lost the plastic bag packaging it was in, so i do not know the recommended voltage range and other details. Does anyone have any experience using this kind of LED? If so, How can i use it for the prop im trying to make?
Well now, the "details" you want include whether it is common anode or common cathode. The common is the long leg, so you use your multimeter on "diode test" to see which combinations of that leg and the others give which colours (the meter will not indicate a value, but the colour will glow) and with which polarity. Alternatively, put it in your breadboard and use the 5V supply from the Arduino and a 220 ohm series resistor to test the combinations.
If you do not have a multimeter then of course your first task is to trot back to Radio Shack to buy one. Should cost around $5. Similarly, if you do not have a breadboard, jumper wires and 220 ohm resistors, you are not in a position to start work either and of these, the 220 ohm resistors are the most important.
The voltages in question are around 2 Volts for the red LED and 3.3V for the other colours.
If the LED is common cathode, you connect the common to ground and the three colours via a 220 ohm resistor each to three PWM pins. If common anode, the common goes to Vcc. 220 ohm will give you 10 mA for each colour except red - which should probably have a 330 ohm resistor. 10 mA is a near enough guess for the LED in any circumstance.
You should be able to find some PWM code somewhere to get an idea of how to fade from one colour to another.