Hey all,
So I have decided to make an 8X8X8 led cube. here is what i have going for me already. I have 8 MAX7219 that i am going to use to control each of the 8 - 8X8 layers of with cube. I have already done a few projects with the MAX7219's so i am familiar with the programming, wiring and such for these chips. My question lies in the "which data structure should i use" category. I know there are 512 LEDS, or 64 bytes of data. if i were to keep track of all the leds for each change of the system, just to cycle thur all the leds one time would take about 32k of space to store this info and that doesn't include the timing information. As i am using the original Arduino Mega, I don't have this sort of memory to store these light patterns. so much for my first idea. My second idea is to just track the led's that are changing. like a coordinate system (x,y,z), which would need only 9 bits. This would leave me 7 bits to hold the timing information and if it is on or not. so recrunching the number for the above example of cycling thru the LEDs is now 3k. It is TON better as far as space, but again, with a Flash Memory of 128 KB (of which 4 KB used by bootloader), SRAM of 8 KB and EEPROM of 4 KB, i will still only be able to store one pattern. and i am not even talking about a complex one either. Am i attacking this the wrong way???
O-O-O-O-O-O-O-O
/ / / / / / / /|
O-O-O-O-O-O-O-O O
/ / / / / / / /|/|
O-O-O-O-O-O-O-O O O
/ / / / / / / /|/|/|
O-O-O-O-O-O-O-O O O O
/ / / / / / / /|/|/|/|
O-O-O-O-O-O-O-O O O O O
/ / / / / / / /|/|/|/|/|
O-O-O-O-O-O-O-O O O O O O
/ / / / / / / /|/|/|/|/|/|
O-O-O-O-O-O-O-O O O O O O O
/ / / / / / / /|/|/|/|/|/|/|
O-O-O-O-O-O-O-O O O O O O O O
|/|/|/|/|/|/|/|/|/|/|/|/|/|/|
O-O-O-O-O-O-O-O O O O O O O
|/|/|/|/|/|/|/|/|/|/|/|/|/|
O-O-O-O-O-O-O-O O O O O O
|/|/|/|/|/|/|/|/|/|/|/|/|
O-O-O-O-O-O-O-O O O O O
|/|/|/|/|/|/|/|/|/|/|/|
O-O-O-O-O-O-O-O O O O
|/|/|/|/|/|/|/|/|/|/|
O-O-O-O-O-O-O-O O O
|/|/|/|/|/|/|/|/|/|
O-O-O-O-O-O-O-O O
|/|/|/|/|/|/|/|/|
O-O-O-O-O-O-O-O
| | | | | | | |