What is "charlieplexing"? (a short demo using the Raspberry Pi)

While I was reading Raspberry Pi Cookbook, I came across a few things that looked interesting to demo. One of them was the concept of “charlieplexing“. On past projects, when I needed multiple LEDs (like in my Simon clone), I just connected each individual LED to its own GPIO pin. I was fully aware that current had to travel through the LED in one direction and that it wouldn’t light in the other direction, but it hadn’t occurred to me to take advantage of that fact. This is where charlieplexing comes in – we arrange multiple LEDs such that »