Charlieplexing and YOU!
I was in the lab last week and we got onto the topic of seven segment displays. Someone then proposed the challenge of driving it using only 4 I/Os without a driver. A very interesting challenge indeed. After much deliberation they finally shared the secret of Charlieplexing. This is a basic way to control large arrays of LEDs using just a few pins. In fact the equation works out as follows: L = n^2 - n Where L is the number of LEDs controlled and n is the number of pins that are used. Personally, I love this. I love LEDs and I love controlling them. Some possible project include using this method for larger LED cubes, 7-segment driving, and other fantastical inventions. Anyway, The circuit is actually pretty simple and available at the end of the video above. As for the code, it is just a matter of reassigning the pins to output or input on the fly and then changing the state of the other outputs. This goes into how it works. With a 3 pin setup, one pin must be changed to an inpu...