This project uses an RGB LED to produce colors inside a white egg. The brain of the random selection is an ATMEL Attiny85 microcontroller programmed with an Arduino board. The part that communicates with the remote controls is a phototransistor sensitive to the wavelength of light and modulation (carrier frequency) of the remote.
Step 1: Getting what you will need:
1 common anode RGB LED (I got mine from adafruit.com (#159))
3 220 ohm 1/4 watt resistors
1 Infrared (IR) phototransistor (you can order one from adafruit.com (#157) or salvage one.)
3 or 4 1.4 volt batteries (I got these at the drugstore (for hearing aids))
The IR phototransisitor that I used in this project came from the front panel of a lifeless VCR. If you are ordering other parts, it is cheap to buy a new one ($2?), but I actually do get a kick out of digging as many parts as I can out of old machines.
The resistors only serve to limit current to the LED, so anything from 180 to 560 would really be OK, just use 3 of the same value.
If the RGB LEDs you find are common cathode, connect the common pin to ground, obviously, but I think the code will still work, just producing the chromatic compliment of whatever you would get from a common anode part. I think.
For this circuit, I stacked up 4 little batteries and got about 5.4 volts. In the past, I have run projects using the Attiny85 and RGB LEDs with a 3 volt coin cell (CR2032 type), but the IR transistor in this project seems to really want 5 volts to run properly.