Scroll text with MAX7217 and Ledcontrol

Hello!

I search whole Internet and not found any examples how to do scroll message with ledcontrol. I try it myself, and have some problems.

My code:

#include "LedControl.h"
LedControl lc=LedControl(12,11,10,1);

void setup() {
  lc.shutdown(0,false);
  lc.setIntensity(0,1);
  lc.clearDisplay(0);
}

const byte a[6]={B01111110,B10001000,B10001000,B10001000,B01111110,B00000000};
const byte r[6]={B00111110,B00010000,B00100000,B00100000,B00010000,B00000000};
const byte d[6]={B00011100,B00100010,B00100010,B00010010,B11111110,B00000000};
const byte u[6]={B00111100,B00000010,B00000010,B00000100,B00111110,B00000000};
const byte i[6]={B00000000,B00100010,B10111110,B00000010,B00000000,B00000000};
const byte n[6]={B00111110,B00010000,B00100000,B00100000,B00011110,B00000000};
const byte o[6]={B00011100,B00100010,B00100010,B00100010,B00011100,B00000000};

void display(const byte letter[6]) {
 int i,j,k = 0;
  for (i=8; i>=0; i--) {
  for (j=0; j<6; j++) {
      lc.setRow(0,j+i,letter[j]);
      }
      delay(150);
}
}

void scroll(char * s) {
  int var=0;
  while (s[var]) {
    if (s[var]=='A')
      display(a);
    if (s[var]=='R')
      display(r);  
    if (s[var]=='D')
      display(d);   
    if (s[var]=='U')
      display(u);   
    if (s[var]=='I')
      display(i); 
    if (s[var]=='N')
      display(n); 
    if (s[var]=='O')
      display(o); 
    var++;
  }
}

void loop() { 

scroll("ARDUINO");
}

and effect:

I would get a better result, like

but no idea how to that.

From the looks of it, you arent clearing the buffer of the values used before, you are just overwriting the current letter.

Any luck with scrolling text? I'm trying to accomplish same thing, and have no problem with scrolling one letter, but when it comes to text, I'm stuck :frowning:

Any luck with scrolling text?

That depends on how you scroll a single 8x8 image.

Hi arteqw ,

have a look at the second and third posts on this thread
http://arduino.cc/forum/index.php/topic,126712.0.html
Pedro.