To display text that slides into place on an LCD screen connected to an Arduino Uno using an I2C converter

code:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2); // Set the LCD I2C address and the number of columns and rows

void setup() {
lcd.init(); // Initialize the LCD
lcd.backlight(); // Turn on the backlight
}

void loop() {
// Text to slide into place
String textToDisplay = “Free Palestine [Pray For Palestine] “;

// Clear the LCD
lcd.clear();

// Display the text with a sliding effect
for (int i = 0; i <= textToDisplay.length(); i++) {
lcd.setCursor(0, 0);
lcd.print(textToDisplay.substring(i));
delay(200); // Adjust the delay for the sliding speed
}

// ██████  ███████ ██ ███████ ███████     ██████  ██████  ███    ███ 
//██  ████ ██      ██ ██      ██         ██      ██    ██ ████  ████ 
//██ ██ ██ ███████ ██ █████   █████      ██      ██    ██ ██ ████ ██ 
//████  ██      ██ ██ ██      ██         ██      ██    ██ ██  ██  ██ 
// ██████  ███████ ██ ███████ ██      ██  ██████  ██████  ██      ██ 
                                                                   

// Wait for a while
delay(1000); // Adjust the delay between slides
}

//  ▄▄▄▄▄▄▄▄▄   ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄       ▄▄ 
// ▐░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░▌     ▐░░▌
//▐░█░█▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀  ▀▀▀▀█░█▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░▌░▌   ▐░▐░▌
//▐░▌▐░▌    ▐░▌▐░▌               ▐░▌     ▐░▌          ▐░▌          ▐░▌          ▐░▌       ▐░▌▐░▌▐░▌ ▐░▌▐░▌
//▐░▌ ▐░▌   ▐░▌▐░█▄▄▄▄▄▄▄▄▄      ▐░▌     ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░▌          ▐░▌       ▐░▌▐░▌ ▐░▐░▌ ▐░▌
//▐░▌  ▐░▌  ▐░▌▐░░░░░░░░░░░▌     ▐░▌     ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌          ▐░▌       ▐░▌▐░▌  ▐░▌  ▐░▌
//▐░▌   ▐░▌ ▐░▌ ▀▀▀▀▀▀▀▀▀█░▌     ▐░▌     ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌          ▐░▌       ▐░▌▐░▌   ▀   ▐░▌
//▐░▌    ▐░▌▐░▌          ▐░▌     ▐░▌     ▐░▌          ▐░▌          ▐░▌          ▐░▌       ▐░▌▐░▌       ▐░▌
//▐░█▄▄▄▄▄█░█░▌ ▄▄▄▄▄▄▄▄▄█░▌ ▄▄▄▄█░█▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▄        ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌▐░▌       ▐░▌
// ▐░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌▐░▌       ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌       ▐░▌
//  ▀▀▀▀▀▀▀▀▀   ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀  ▀         ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀         ▀
 
 

0sief