Hola a todos,por favor alguien que me pueda decir como cambiar el letrero del srrol es decir que vaya todo corrido y no de saltos,tengo 4 leds y si la palabra no cabe entera va dando saltos intermitentes hasta que se ve,yo quiero que se lea (cerramos los lunes) todo seguido.
Gracias.
//We always have to include the library
#include "LedControlMS.h"
/*
Now we need a LedControl to work with.
***** These pin numbers will probably not work with your hardware *****
pin 12 is connected to the DataIn
pin 11 is connected to the CLK
pin 10 is connected to LOAD
We have only a single MAX72XX.
*/
#define NBR_MTX 4
LedControl lc=LedControl(12,11,10, NBR_MTX);
/* we always wait a bit between updates of the display */
String scrollString= "CERRAMOS LOS LUNES ";
int stringLength=scrollString.length();
char ch0, ch1, ch2, ch3;
int nextCharIndex=0;
void setup() {
/*
The MAX72XX is in power-saving mode on startup,
we have to do a wakeup call
*/
Serial.begin (9600);
Serial.println("Setup");
Serial.println(scrollString);
Serial.println(stringLength);
for (int i=0; i< NBR_MTX; i++){
lc.shutdown(i,false);
/* Set the brightness to a low value */
lc.setIntensity(i,1);
/* and clear the display */
lc.clearDisplay(i);
}
delay(100);
lc.clearAll();
ch0= scrollString[0];
ch1= scrollString[1];
ch2= scrollString[2];
ch3= scrollString[3];
nextCharIndex=4;
}
void loop(){
lc.displayChar(0, lc.getCharArrayPosition(ch0));
lc.displayChar(1, lc.getCharArrayPosition(ch1));
lc.displayChar(2, lc.getCharArrayPosition(ch2));
lc.displayChar(3, lc.getCharArrayPosition(ch3));
ch0=ch1;
ch1=ch2;
ch2=ch3;
ch3=scrollString[nextCharIndex++];
if (nextCharIndex>=stringLength) nextCharIndex=0;
delay(300);
lc.clearAll();
delay(25);
}