I am new to arduino, but i have been reading up alot and i am now addicted to the platform and its possibilities!!!
I am currently working on a IR remote controlled by the PC. What i would like to do is have 3 IR led's that are each dedicated to an individual device. So there will be a LED for the TV and one for the set-top-box etc. The reason i want to do this is for the sake of neatness for the complete project instead of having the IR LED sit some distance away from the TV. I would like to hide the Arduino project box behind it.
My question is how would i go about using multiple LED's taking into account that Ken's library is coded to use one output. Could i simple have 3 LED's leaving the one output?
Or would i need to use something like a multiplexer? where i can send the signal from arduino and then use 3 other outputs to switch the right output on?
Any advice or suggestions will be greatly appreciated!!
One way would be to have the cathodes of all three LEDs connected to the same output, then have the anodes (through a resistor) connected to three separate output pins. Only the LED that had it's anode held HIGH would actually light. Those with the outputs held LOW would not.
You could then select what LED would be shining from the library.
Make sure only one of these select outputs is high at once or else you might run into trouble overloading the current capacity of the cathode pin.
The grounding happens at the cathode end. The library output pin acts as the ground, we say it sinks the current. The anode pins act as a source of current. It is only when you want to select what LED you have on you do this, normal one end of the LED / resistor chain is at +5V or ground.