The Heart of the Arduino microcontroller
To see my actual cube in action please visit HERE (apologies in advance for the shaky video and I hasten to add the video quality washes out the colours)
Charlieplexing is an ingenious method (devised by Charlie Allen in 1995) for controlling lots of LEDs without using many microcontroller pins. It takes advantage of the fact that LEDs are diodes. Connect two LEDs in parallel but with opposite polarity so that only one conducts (lights up) at a time and that is the basis of Charlieplexing.
The number of LEDs you can control is determined by the formula: N pins x (N pins – 1). For example, if you have 4 pins, you can control 12 LEDs (4 pins x 3 pins). Nine pins will get you 72 LEDs!
My 4x4x4 RGB cube has 64 red, 64 green and 64 blue (192 LEDs) using 15 pins of an Arduino microcontroller. Sketches are written and uploaded to the microcontroller that light up and animate the cube to display endless patterns and colours.