#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4); // Change the I2C address (0x3F) to match your LCD
void setup() {
lcd.init(); // Initialize the LCD
lcd.backlight(); // Turn on the backlight
// Set up scrolling text on the first line
String textToScroll = "Arvind patil";
int textLength = textToScroll.length();
int lcdWidth = 20;
int scrollSpeed = 300; // Adjust this value to control the scrolling speed
for (int i = 0; i < textLength + lcdWidth; i++) {
lcd.clear();
int startIndex = i;
if (startIndex >= lcdWidth) {
startIndex -= (i - lcdWidth);
}
lcd.setCursor(0, 0);
lcd.print(textToScroll.substring(startIndex, startIndex + lcdWidth));
delay(scrollSpeed);
}
lcd.clear(); // Clear the first line
lcd.setCursor(0, 1);
lcd.print("I am from India");
// Set up the blinking effect
lcd.blink();
}
void loop() {
// You can add other code or leave this loop empty, depending on your project needs
}