Go Down

Topic: how to rotate matrix scroll by 90 degrees in code (Read 1 time) previous topic - next topic

Aaron_dyer

Hey guys...I have a 16 x 8 matrix scrolling and adding on 2 more 8 x 8 matrices to make a 32 x 8 matrix scroll.....however, the I have to physically rotate the matrices...how can you do it in code because its difficult for this to work with how the pinouts get placed.....my code is attached

Grumpy_Mike

#1
Dec 05, 2012, 08:54 pm Last Edit: Dec 05, 2012, 08:57 pm by Grumpy_Mike Reason: 1
Just rotate your character definitions.

Just write down the columns as rows.

Aaron_dyer

could you look at my code and explain where I would do that though please

Grumpy_Mike

I am on my iPad and it won't copy your code but I will try.
Code: [Select]

B00110011;
B11001111;
B00111000;
B01010101;
B11011100;
B11110000;
B00000000;
B00011100;


Would be
B11010000;
B11000000;
And so on, each coloumn becomes a row. This rotates the pattern you se.

dhenry

If you look at your code, it is using printLED(). In particular, it uses this line:

Code: [Select]
   int c = font8x8[(number * 7) + a];      // Index into character table to get row data


All you need to do is to rewrite that line.

Go Up