Hi.
I am doing a Conway's game of life implementations and I am working with four 8x8 LED matrices. I represent each one as an array of bytes. Like this:
// Data for the upper left LED matrix.
byte displayUpLeft[8]={ B00000000,
B00000000,
B00100000,
B00000000,
B00000000,
B00000000,
B00000010,
B00000000};
I realize that this is a one dimensional array. I still need to rotate the contents 180 degrees. Storing the contents like this makes it very easy to update the display.
I have not implemented the calculations needed for the generations. I just found out when I tried the displays that this is going to be a problem later on. That is why I am asking here.
For two of the matrices (upper left and lower left) the values get displayed like they are represented but I have to rotate two (upper right and lower right) of the displays 180 degrees.
My question is if there is a simple way to rotate a byte array on an Arduino?
Cheers!