#include <Wire.
h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars
and 2 line display
void setup()
{
lcd.init(); // initialize the lcd
lcd.backlight(); // Turn on the LCD screen backlight
}
void loop()
{
char arr[] = "Hello World!"; // Let the compiler determine the size automatically
char arr1[] = "Jairo";
int stringLength = strlen(arr);
int strlngth = strlen(arr1);
for (int i = 0; i < stringLength; i++) {
lcd.setCursor(i, 0); // Set cursor position for each character
lcd.print(arr[i]);
delay(100); // Reduce delay for faster display
}
delay(1000);
lcd.clear();
delay(2000);
for (int j = 0; j < strlngth; j++) {
lcd.setCursor(j, 0); // Set cursor position for each character
lcd.print(arr1[j]);
delay(100); // Reduce delay for faster display
}
delay(1000);
lcd.clear();
delay(2000);
}