Question about Scroll Display Left

Hi, I'm a high school student working on an arduino project and I'm almost finished I believe but have come to a hiccup.. What the API say is that scrollDisplayLeft() moves the entire display one to the left. I am wondering if there is a way to have the entire lcd board on and select a segment of the display and only call scrollDisplayLeft() on that segment, for example you could select or isolate only the right half of the board, call scrollDisplayLeft and only that portion would move left. Is this possible? Or something like this possible? And most importantly how so? Thank you!

No, for that you would need to make you own function. What you can do is make a table (array) of everything that is to go on the screen, then you can move whatever you want in the array then update the screen.

HazardsMind:
No, for that you would need to make you own function. What you can do is make a table (array) of everything that is to go on the screen, then you can move whatever you want in the array then update the screen.

I'm not exactly sure how that would work.. The intent of what I'm trying to do is write a char on the top or bottom, corner right, then move all of the right half of the display over to the left one space without changing the left half display. Then continue moving just the right half and as space becomes available write another char in either the top or bottom right corner and continue moving them all as long as they're on the right half of the display. How would you suggest I go about that?

[EDIT] just had an idea... not sure if it'll work but could I set up the display as two with only one lcd screen, like so?

LiquidCrystal lcd_left(12, 11, 5, 4, 3, 2);
LiquidCrystal lcd_right(12, 11, 5, 4, 3, 2);

void setup(){
lcd_left.begin(8, 2);
lcd_right.begin(16, 2);

}

I don't think it will work even like that. The scrollDisplay functions will move whatever is on the screen. I'll try something on my end but I still don't think it will work.

This is what I came up with. I modified another users sketch that I had.
You will need to change a few things to get it to work on your screen. Also it would be better if this was made into a class.

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
#define N_CHARS  ((sizeof(Compass)/sizeof(Compass[0]))-1)

LiquidCrystal_I2C lcd(0x20,20,4);  // set the LCD address to 0x20 for a 16 chars and 2 line display

char Compass[21] = {
  "N....E....S....W...."};
  
int index = 19, index2 = 0;
unsigned long time = 0, time2 = 0;

void setup()
{
  lcd.init();                      // initialize the lcd  
  lcd.backlight();
}

void loop() 
{
  setHeadingRight(0, 1000);
  setHeadingLeft(1, 500);
}

void setHeadingRight(byte row, unsigned long duration) 
{
  if(millis() - time > duration)
  {
    time = millis();
    if(index >= 0)
    { 
      index--;
      for (int i = 0; i < N_CHARS; i++) 
      {
        lcd.setCursor(i,row);
        if(index == N_CHARS) index = 0;
        lcd.print(Compass[index++]);	
      }
    }
    else index = 19;
  }
}

void setHeadingLeft(byte row, unsigned long duration2) 
{
  if(millis() - time2 > duration2)
  {
    time2 = millis();
    if(index2 < 20) 
    {
      index2++;
      for (int i = 0; i < N_CHARS; i++) 
      {
        lcd.setCursor(i,row);
        if(index2 == N_CHARS) index2 = 0;
        lcd.print(Compass[index2++]);	
      }
    }
    else index2 = 0;
  }
}

Hmmm I'm really desperate for this two work, but not gonna lie I don't understand any of what you have written there.

I modified it a little bit and add comments. I don't know exactly what your trying to do, but if you want two rows to shift at the same time (or different times) in opposite directions, then this is what you need.

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
#define N_CHARS  ((sizeof(MessageOut)/sizeof(MessageOut[0]))-1)
#define N_CHARS2  ((sizeof(MessageOut2)/sizeof(MessageOut2[0]))-1)

LiquidCrystal_I2C lcd(0x20,20,4);  // set the LCD address to 0x20 for a 16 chars and 2 line display

char MessageOut[21];
char MessageOut2[21];
  
int index = 19, index2 = 0;
unsigned long oldTime = 0, oldTime2 = 0;

void setup()
{
  lcd.init(); // initialize the lcd  
  lcd.backlight();
}

void loop() 
{
  setHeadingRight("Hello", 0, 1000); // message, row, duration (1 second)
  setHeadingLeft("Welcome", 1, 500); // message, row, duration (half second)
}

void setHeadingRight(char * msg, byte row, unsigned long duration) 
{
  strncpy(MessageOut, msg, sizeof(MessageOut));
  if(millis() - oldTime > duration) // check the difference of the current time "millis()" to the previous time "oldTime" against the duration you want.
  {
    oldTime = millis(); // update oldTime with the current time
    if(index >= 0) // make sure the index does not go under 0
    { 
      index--; // decrecment index by 1
      for (int i = 0; i < N_CHARS; i++) // this part here displays the message on the display
      {
        lcd.setCursor(i,row); // set the column to show the element in the array
        if(index == N_CHARS) index = 0; // set index back to 0 if the index has reached the arrays max size.
        
        if(MessageOut[index++] != NULL) // if the element @ index is anything but NULL, show it.
          lcd.print(MessageOut[index-1]);
        else 
          lcd.print(' '); // if the element @ index is NULL, display a space.  	
      }
    }
    else index = 19; // if index is less than 0, then set it back to 19
  }
}

void setHeadingLeft(char * msg, byte row, unsigned long duration2) 
{
  strncpy(MessageOut2, msg, sizeof(MessageOut2));
  if(millis() - oldTime2 > duration2)
  {
    oldTime2 = millis();
    if(index2 < 20) // check to see if index2 is under the array max size
    {
      index2++; // increment index
      for (int i = 0; i < N_CHARS2; i++) // same as above
      {
        lcd.setCursor(i,row);
        if(index2 == N_CHARS2) index2 = 0;
        
        if(MessageOut2[index2++] != NULL)
          lcd.print(MessageOut2[index2-1]);
        else 
          lcd.print(' ');	
      }
    }
    else index2 = 0; // otherwise set it back to 0
  }
}