Question in LCD 16×2

Hello everyone :slight_smile:
I am new to start using Ardunio with Lcd my quetion is

How I put two text ,for example text1 in top and second one text2 in sexconf line
Each one go in diffrenet direction e.g
Text1 to left
Text 2 to right
using push button
Thank you
Plz help meeee I have quize :confused:

I can not think of any way to do this in hardware.

Choose one of the texts as "regular". Scroll it in the regular way.

The other text needs to be rewritten so that it appears to move in the opposite direction.
Remember to write spaces to overwrite the old contents.

This scheme would be the most efficient way to use the hardware but it will probably give you brain-ache.

Another method is to maintain all your text movements in an SRAM buffer. Then rewrite the whole 16x2 in one go. You can debug the buffer method by testing it on a Serial Terminal.

David.

Thanks ..
see my program , how i put text1 go right and text2 to left ..

de <LiquidCrystal.h>

LiquidCrystal lcd(12, 11,6, 5, 4, 3);

volatile int state = LOW;

void setup() {

lcd.begin(16, 2);

lcd.setCursor(5,0);

lcd.print("text1");

lcd.setCursor(5,1);

lcd.print("text2");

delay(1000);

attachInterrupt(0, ledOnOff, RISING);

}

void loop(){

int K=0;

if (state) {

for (int k = 0; k <= 10; k++) {

lcd.scrollDisplayRight();

delay(500);

}

for (int k =10; k>=0; k--) {

lcd.scrollDisplayLeft();

delay(500);

}

}

}

void ledOnOff() {

static unsigned long lastMillis = 0;

unsigned long newMillis = millis();

if (newMillis - lastMillis < 50){

}

else {

state = !state;

lastMillis = newMillis;

}

}