I have a bunch of 3D arrays in the following form:
byte lines[][4][2] {
{ {B00000000, B11110000 },
{B00000000, B11110000 },
{B00000000, B11110000 },
{B00000000, B11110000 } },
{ {B11110000, B00000111 },
{B00000000, B11111000 },
{B00000000, B11111000 },
{B00000000, B11111000 } },
// continues for numerous elements
}
They are a bunch of values to push out to a pair of shift registers controlling an LED matrix. Each array is essentially an animation that plays across the LED matrix.
I would like to put my collection of arrays into an array so I can iterate through them. I know I can just combine them into one big array but the code is already opaque and I would at least like to keep separate named arrays so I can sequence and rearrange a series of animations by rearranging a series of named arrays in another array rather than one massive array of opaque binary values.
I want to do something like this
sometype* sequence[] = { lines, circles, squares } ;
or if that's not possible then:
sometype* sequence[3];
sometype[0] = lines;
sometype[1] = circles;
sometype[2] = squares;
Can I do this or some approximation thereof? If so what is "sometype"? I can't figure out how to say "an array of pointers to 3d byte arrays" or whatever it is I am trying to do. What is the syntax for deeclaring the array and dereferencing the pointers?