I have some LEDs that are Bi-Color so if you make a circuit like this:
[+]-----[LED]-----[-]
you get one color, and if you do it the opposite:
[-]-----[LED]-----[+]
You get the other color.
I am wondering what is the appropriate way to wire this to the Rasberry pi? Thus far I've only powered "normal" LEDs and I've always done something like this:
[GPIO]---[RESISTOR]---[LED]----[GND]
The only way I can imagine wiring up one of these dual LEDs something like this:
[GPIO1]----[RESISTOR?]---[LED]----[GPIO2]
And then put GPIO1 to high, and GPIO2 to low, or vice versa to get the different colors.
My question is will that damage the board in some way to connect two of the GPIO pins together in a circuit through the LED. Additionally should I include resistor(s) in the circuit? and if so where? Does there need to be one on either side of the LED?