I want to make some characters scroll left without affecting the first positions in each row of my LCD 16x2 screen. I have this code inside the loop so far:
lcd .clear();
lcd.setCursor(17, 0);
for (int i = 15; i > 0; i--) {
lcd.print("x");
lcd.scrollDisplayLeft();
if (digitalRead(switchPin) == HIGH) {
lcd.setCursor(0, 0);
lcd.write(5);
} else {
lcd.setCursor(0, 1);
lcd.write(5);
};
lcd.setCursor(17, 0);
delay(500);
}
lcd.noAutoscroll();
I think it should work, but the character x just moves left by one position, whereas the character in the first position, either in the first or second row doesn't appear at all.