I had an idea where i would have a small box (1in x 1in x 1in) with a hole in it. Now what i wanted to do with it was to have a bicolor led inside and a sensor (looking through the hole) to sense when i have my hand over it. When I didn't have my hand there, it would be 1 color, and the other color when my hand was there. Then I was going to build 8 of these units, connect them together to a 12v battery, with a switch to turn them on and off. Whew! Can anyone help??
Ya I can help but first what are these going to be yoused for.And give me time to draw up the diagram.
Let me get this strait you want the box to glow and when your hand moves over it you want the tri colored led to light the othere color(lets say blue) while the othere colore (green)is on
Its kinda a bad drawing but I think you can figure it out. The resister is a 10k ohm one and the battery is 9 volts and I forgot you have to have a resister in front of the red part or half of the led.Oh and on the transister the little arrow thing on transisters is soposed to be on the bottom line the one going like\.And were the photo resister and the transister line are touching the arn't connected.
yeah the circut jtggg posted does not include color switching provisions, just color addition (and there are no resistors protecting the LED...). if you do not mind this then that circut is fine. but with one more transistor you could have it turn off one side when the other side turned on. ...let me know if your intrested....