Sketch examples of scrolling text on 8x8 LED matrix w/ MAX72xx

I've made some progress. Example program "LCDemoMatrix" that came with LedControl library had a very clear structure so I can understand it easy (not so much luck with other examples). I realized that characters were stored "sideways" i.e. letter "A" is defined as:

byte a[8]={B00000000,B01111111,B10001000,B10001000,B10001000,B10001000,B01111111,B00000000};

Well I made it bigger and 8x8. So it's very easy to scroll by just moving starting row. So as dhenry mentioned it depends how your text stored (column vs. row) and I think how your LED matrix arranged physically (at which side they touch). So I think in the LedControl they use column-wise text, and other examples on this forum used "row-wise" fonts.
Anyway, I had to do this from scratch so I came up with this way to scroll it on a single matrix:

void text_scroll(int screen){
  
  // Define "A" Character columnwise orientation
  byte a[8]={B00000000,B01111111,B10001000,B10001000,B10001000,B10001000,B01111111,B00000000};
  
  for(int j=pos;j<8;j++){ // This first for loop will shift position of the row
     for(int i=0;i<8;i++) { // This second loop will display character
        lc.setRow(screen,i+j,a[i]); // Display character
    }
    delay(100); // speed of animation
    } 
    pos = -8; // From this point character will advance from "beyond" screen
}

"pos" variable is initially set to 0, so character will start from the middle of the matrix, but then it will always "flow" from the side. Screen specifies which matrix device to address. Don't forget you need to initialize and define them in the beginning (see orignal LCDemoMatrix example).
I'm not quite sure why it works, and how library handles negative rows, but it works :slight_smile:
Of course this is very rough code, and animation doesn't wrap around or continues smoothly to the next screen, but I think I can figure it out. Oh and I didn't use buffer at all yet....
I'll keep this thread updated if anyone find it interesting.