As part of a HacDC (http://www.hacdc.org/ ) workshop I built a freestanding 3x3x3 blue LED cube. It's controlled by a Arduino. The video has two code examples.
On both projects I wrote the code keeping particular attention to the intensity of the LEDs. That is, I wanted the brightness of the LED's to be constant even if only one is lit or six (or more).
For example, on the first program only 3 LEDs are lit at any one instant. It just cycles through 3 sets of 3 LEDs very quickly. The cycle is three LEDs are displayed for approximately 1/1000 of a second (1000 microseconds).. Then the next three for 1/1000 sec and the last three for 1/1000 of a second. That cycle of 3, 3 and 3 LEDs continues for about 1/7 sec (150 milliseconds). Then a similar cycle of the next 9 LEDs (shown in a cycle of 3 sets of 3). And so on. It would be easy to simply light an entire horizontal "level" of 9 LEDs at once, but they would be much dimmer.
I'm a co-organizer of an event called Robot Fest aka Mid-Atlantic Mini-Maker Faire held in Maryland, USA. We occasionally visit groups to bring attention to Robot Fest. I always bring this out with it running the first program. People are mesmerized by it!! Come on out! See http://www.robotfest.com
HI - The schematic is very basic and I think other people have documented it pretty well. The 2nd program isn't very exciting, The 1st program I spent time to make the LEDs uniformly lit. The idea is by doing this, the viewer stops thinking about which individual LEDs are lit, but instead, just sees a plane of 9 lights moving around. I think I documented it pretty well. I'll have to figure out where to post it. But not this week -- too busy getting Robot Fest ready (I can't post the URL)
thithathu 10 months ago