#include <Wire.h> // Library for I2C communication
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd = LiquidCrystal_I2C(0x27, 16, 2); // Change to (0x3F,20,4) for 20x4 LCD.
void setup() {
// Initiate the LCD:
lcd.init();
lcd.backlight();
}
char c[]="Hello guys i am Mokesh Nagpal.";
void loop() {
lcd.clear();
lcd.noAutoscroll();
// Print 'Hello World!' on the first line of the LCD:
lcd.setCursor(0, 0); // Set the cursor on the third column and first row.
for(int i=0;i<strlen(c);i++)
{
if(i>15)
{
lcd.scrollDisplayLeft();
lcd.setCursor(i,0);
}
lcd.print(c[i]);
delay(100);
}
}