agr00m / LedMatrix

An Arduino library for led dot matrix using MAX72XX drivers.
Other
1 stars 1 forks source link

compile error #1

Open nopnop2002 opened 6 years ago

nopnop2002 commented 6 years ago

I tried your ScrollingText example. But It'll be a compile error.

ScrollingText:143: error: 'class LedMatrix' has no member named 'printChar'

      lm.printChar(text4[i], x + ((FONT5x7 + 1) * i), 8);

         ^

exit status 1 'class LedMatrix' has no member named 'printChar

agr00m commented 6 years ago

Should be fixed. I updated the function name to be in-line with the example.

agr00m commented 6 years ago

As to your earlier comment about the index calculation. Each 8x8 display is comprised of 8 indexes based on the row. So that index 0 is display 0, row 0. Index 1 is display 0, row 1. Index 8 is display 1, row 0. This has to do with the way the MAX7219 updates the displays.

Below is a representation of a matrix comprised of 4 displays in a 1x4 arrangement. Each 'box' is a display, and each row is a row of LEDs within the display, and the # is the index of the library's internal byte array. x = [0:7], y=0 will all be index 0. x = [8:15], y=0 will all be index 8. It's just how I decided to organize it, though could have been implemented any number of ways.

--------------------------------------------
|    0    |     8    |    16    |    24    |
|    1    |     9    |    17    |    25    |
|    2    |    10    |    18    |    26    |
|    3    |    11    |    19    |    27    |
|    4    |    12    |    20    |    28    |
|    5    |    13    |    21    |    29    |
|    6    |    14    |    22    |    30    |
|    7    |    15    |    23    |    31    |
--------------------------------------------
nopnop2002 commented 6 years ago

OK Thank you.

Please close this issues.