Code: Select all
void scroll() {
tft.setTextColor(ILI9340_WHITE);
tft.setTextSize(6);
tft.setCursor(0, 10);
tft.print(message.substring(0, len));
if (turn == 2) {
turn = 0;
tft.fillRect(0, 10, 320, 53, ILI9340_BLACK);
message = message.substring(1) + message.charAt(0);
}
turn++;
}
void loop() {
scroll();
}
Without the fillRect the text just builds on top of itself
Any ideas ?
Thanks in advance