Falserose / arudino-maxmatrix-library

Automatically exported from code.google.com/p/arudino-maxmatrix-library
0 stars 0 forks source link

prog_uchar error and tilted chars #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, I see many people getting an "error: 'prog_uchar' does not name a type" 
message: You need to replace 'prog_uchar' with 'const unsigned char' in the 
examples.

My problem is different: All characters appear rotated 90 degrees 
counterclockwise, and shifting downwards instead of right to left. Once a char 
disappears from the bottom of a LED matrix it reappears at the top of the next 
matrix to the right, and so on..

The module I am using consists of a strip of four LED matrices each controlled 
by a MAX7219 the next being cascaded to the previous (dout > din) and clk/cs 
being tied together.

Not sure why this is happening, maybe the design has changed, my guess is this 
needs to be fixed in the library functions themselves. I have been trying to 
play a bit with the setDot function in order to find a way to compensate for 
the tilting chars, what I found out is that the col and row appear to be 
reversed in relation to the LED module (starting at the bottom, position 0,0 
lights the bottom leftmost LED on the rightmost module, then as I increase the 
column value, it lights up the LED a row above, up to 7,0 where the leftmost 
LED at the top row is lit. Once I set column = 8 the next module to the left 
gets the leftmost LED at the bottom row lit).

I figured that "n = col / 8" sorts out which module to address for a given col 
value, but I couldn't for the life of me, figure out what the next line is 
doing (it's a modulus operation performed on col and 8) and how to correctly 
shift out the bits to get my modules working right.

Original issue reported on code.google.com by wmoecke on 9 Mar 2015 at 2:42