#include <LiquidCrystal.h>
#define RS 13
#define E 14
LiquidCrystal lcd(RS, E, 33, 25, 26, 27);
int col = 0;
int row = 0;
bool back = false;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
lcd.begin(16,2);
lcd.clear();
}
void loop() {
String message = "HOLIS!";
String messagef = "FIJO!";
int msglen = message.length();
lcd.clear();
if (col < 16 - msglen && !back) col++;
else if(col >= 16- msglen) back = true;
if (col > 0 && back) col--;
else if (col <= 0) back = false;
lcd.setCursor(col,0);
lcd.print(message);
lcd.setCursor(0,1);
lcd.print(messagef);
delay(100); // this speeds up the simulation
}