I forgot :
As I wrote it in the title, I tried with pointers, but I'm not familiar with these and I only get errors.
My code :
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 13, 8, 9, 5, 11);
int x;
int y;
char *myMsg;
void setup() {
Serial.begin(9600);
delay(500);
lcd.begin(16, 2);
lcd.print("Bienvenue");
delay(2000);
}
void loop() {
int pos = 1;
myMsg[] = "abcdefghijklmnopqrstuvwxyz1234567890";
scroll(&myMsg,1);
}
void scroll(char *msg, int pos){
for (x = 0; x < sizeof(msg) - 1; x++){
Serial.println(sizeof(msg));
if (x+y > sizeof(msg)-1){break;}
for (y = 0; y < 16; y++){
if (x+y > sizeof(msg)-1){break;}
lcd.setCursor(y,pos);
lcd.print(msg[x+y]);
}
if (x == 0) {delay(1000);}
delay(200);
}
delay(1000);
}