Hello,
I am trying to charlieplex 10 RGB LEDs on my Arduino Uno. I only want one LED on at a time, either red or green, so I only need 20 total (5 pins). I got charlieplexing to work using 10 normal LEDs and four pins. The RGB LEDs are common cathode, and I charlieplexed them as such:
| LED # | Red, 5V | Red, GND | Green, 5V | Green, GND |
| 1 | pin2 | pin1 | pin3 | pin1 |
| 2 | pin4 | pin1 | pin5 | pin1 |
| 3 | pin1 | pin2 | pin3 | pin2 |
| 4 | pin4 | pin2 | pin5 | pin2 |
| 5 | pin1 | pin3 | pin2 | pin3 |
| 6 | pin4 | pin3 | pin5 | pin3 |
| 7 | pin1 | pin4 | pin2 | pin4 |
| 8 | pin3 | pin4 | pin5 | pin4 |
| 9 | pin1 | pin5 | pin2 | pin5 |
| 10 | pin3 | pin5 | pin4 | pin5 |
so the common cathode is set to ground, and resistors are used between the individual anodes and the 5V output.
For example, I should be able to turn on LED #3 to be green by setting pin 3 to a high output, pin 2 to a low output, and pins 1, 4, and 5 to input (high impedance). Unfortunately, other LEDs light up when I run the code (see attached). When I set LED #3 to light green, the LEDS that share pin 2 or 3 also light up (but not as brightly). So I also get LED #1 green, LED #8 red, LED #10 red, and LED #4 seems to try to light both.
What could be my issue? I did solder together my LEDs, so there could be issues there as well. However, this issue happens when I try to light any of the LEDs. Is there anything in the code that I am missing? Is this not a good application for charlieplexing? Any advice is welcome. Please ask questions if I have not been clear or detailed enough. Thanks,
ForeverBlue