Go Down

Topic: Big array issues, help (Read 1 time) previous topic - next topic



I've built an 8x8x8 LED cube using shift registers and POV to display cool patterns. The first version of the code involved only one pattern being displayed at a time, ie only one array programmed. This has become somewhat of a pain because each time i want to switch animations i have to reprogram. An example of an animation would look like:

byte data[][65]={
{ B10000000, B01000000, B00100000, B00010000, B00001000, B00000100....

I am currently working on the second version of the code that will allow me to change patterns on the fly via serial communications. I'm trying to give each pattern its own array, and then choose which array is being displayed. But when I reach a certain number of array entries, things stop working (random stuff gets displayed or everything goes black).

Is there a way to fix this?

Coding Badly

In a word ... PROGMEM.  The Flash Library from Mikal Hart makes it easy...


Go Up