conversion of 3d to 2d array freezeing arduino

doing an 8x8 led matrix display project and i basically have a 3 dimensional matrix composed of the 8x8 letters in the matrix format

#define PCOLS 8
#define PROWS 8

#define CHARS 12
#define _MICRODELAY 100
#define BUFFCOLS (CHARS*PCOLS)
#define BUFFROWS PROWS
#define SERIALRATE 115200
#define _H { \
    {1, 0, 0, 0, 1, 0, 0, 0}, \
    {1, 0, 0, 0, 1, 0, 0, 0}, \
    {1, 0, 0, 0, 1, 0, 0, 0}, \
    {1, 1, 1, 1, 1, 0, 0, 0}, \
    {1, 0, 0, 0, 1, 0, 0, 0}, \
    {1, 0, 0, 0, 1, 0, 0, 0}, \
    {1, 0, 0, 0, 1, 0, 0, 0}, \
    {0, 0, 0, 0, 0, 0, 0, 0}  \
}

int storage[CHARS][PROWS][PCOLS]={_H,_e,_ll,_o,_SPACE,_W,_o,_r,_l,_d,_SPACE,_happyface};
int storage2[BUFFROWS][BUFFCOLS];

, i made a small function to take the 3D matrix and copy it into a 2 D matrix that i will use as the full message buffer

void threeDto2D()
{            
  

int coll=0;
for(int i =0;i<CHARS;i++)
 {      
     for(int j =0;j<PROWS;j++)
       {      
          for(int k =0;k<PCOLS;k++)
               {
                 storage2[j][k+coll]=storage[i][j][k];
              }
        }
     coll+=PCOLS;
}
}

problem is that after this is called in the setup loop the program freezes or at least the serial monitor goes haywire and no serial output is seen i have commented out all other sections of code and have determined this to be the issue

i cant see what is missing a little help please -Jesus

Try calculating how much memory you are using...?

;D

currently its only using 2654 bytes of 30k according to the arduino ide

Oh, but the IDE reports available space for the program, not for the variables.
The memory in question is called RAM.

thanks for that i can see that using two essentially 8812 int arrays may take up alot of space too drained to continue working the problem right now but it seems that memory may need to be addressed

thanks will respond with results as they come. :slight_smile: