LCD Left Scroll on Row 1 & Right Scroll in Row 2 at a time

Ya I too noticed that but what I got is the code here i mentioned and this one is working and you may check it too with any of the board

The library function scrolls the entire display, not individual lines.

Here is a sample of manually scrolling the text, a little complex since it is scrolling characters from past the ends of the lines:

#include <LCD_I2C.h>
LCD_I2C lcd(0x27, 16, 2);

void setup()
{
  lcd.begin();
  lcd.backlight();
  char line0[] = "                 Let's Rock On";
  char line1[] = "Get Set Go                  "; 
  char temp[17];
  temp[sizeof(temp) - 1] = '\0';
  for (int i = 0; i < 18; i++)
  {
    //lines are too long to fit onto the display line
    //  copy the portion that will fit
    memcpy(temp, line0, sizeof(temp) - 1);
    lcd.setCursor(0, 0);
    lcd.print(temp);
    memcpy(temp, line1 + sizeof(line1)-sizeof(temp) - 1, sizeof(temp) - 1);
    lcd.setCursor(0, 1);
    lcd.print(temp);
    //shift line0 left one character
    for (size_t j = 0; j < sizeof(line0) - 2; j++)
    {
      line0[j] = line0[j + 1];
    }
    line0[sizeof(line0) - 2] = ' ';
    //shift line1 right one character
    for (size_t j = sizeof(line1) - 1; j > 0; j--)
    {
     line1[j] = line1[j-1];
    }
    line1[0] = ' ';
    delay(500);
  }
}

void loop() {
}

Wowww
My goodnesssss

A bit complex one but seems intresting
Le me make practicals on that and ll get back to you with reports

Thanks

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.