A simple RGB colour changing lamp on the TI Launchpad. Using one RGB LED, 3 resistors and a potentiometer.
Here’s the breadboard and Launchpad version:
(On my RGB LED, pin 2 is longer than the rest, it’s the cathode)
I brought out GND, TEST, RESET and VCC to a 4 pin header, so I can use the Launchpad to do In-System-Programming and debug.
I’d like to mount it inside a small plastic bottle to help diffuse the light. But, a jam jar will do for now:
Source code and Eagle files: lamp.tar.gz
Turning the potentiometer moves smoothly through hues. The colours are always fully saturated. To show different RGB values, set led_brightness[0 to 3].
Bits of code cobbled from: http://www.nunosantos.net/?p=114