Hello all... A programming question:
I bought an 8x8 matrix for my arduino. Fun to play with.
In the example script that comes with it, they use these separate 2d arrays to store little images you might want to display... example:
static const uint8_t PROGMEM
smile_bmp[] =
{ B00111100,
B01000010,
B10100101,
B10000001,
B10100101,
B10011001,
B01000010,
B00111100 },
neutral_bmp[] =
{ B00111100,
B01000010,
B10100101,
B10000001,
B10111101,
B10000001,
B01000010,
B00111100 },
frown_bmp[] =
{ B00111100,
B01000010,
B10100101,
B10000001,
B10011001,
B10100101,
B01000010,
B00111100 };
----> and then to DISPLAY one of those little images, you say something like:
matrix.clear();
matrix.drawBitmap(0, 0, smile_bmp, 8, 8, LED_ON);
matrix.writeDisplay();
... BUT... what I would really love to do is to have an ARRAY of those two-dimensional arrays, so that instead of having to have separate statements like drawbitmap(0,0,smile_bmp...), I could instead simply have one more argument that would specify like drawbitmap (0,0,4...) for the fourth image or drawbitmap (0,0,9...) for the 9th one, etc.
Of course I realize that an array of two-dimensional arrays is logically a 3-dimensional array. BUT, it's simply that after fiddling with syntax and so forth, I simply couldn't get it to work without errors etc.
---> Can someone tell me how one could set up that first long series of bitmap definitions but doing so so that the first was being called ... ,0, ... and the second was being defined as ,1,... and so forth... so that later on I could do For loops that would simply scan through images, etc?
THANKS for any assistance! [sorry for editing, my first post got posted when I was 5% done with writing.]