2. Scroll any message on 16x2 LCD

Updated: Feb 27, 2020

Create new program and save as "Scroll message"

Source code as follows:-


#include <ESP8266WiFi.h>

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x3F, 16, 2);

int counter_s,k;


void setup()

{

k=0;

lcd.begin();

lcd.backlight();

lcd.setCursor(0, 0);

delay(10);

lcd.print("HEllo friends");

delay(1000);

}

void loop()

{

if(k==0)

{

lcd.clear();

lcd.setCursor(0, 0);

lcd.print("Congratulations");

delay(800);

}

lcd.scrollDisplayLeft();

delay(400);

k=1;

delay(10);

}


  • Circuit Diagram





14 views0 comments

Recent Posts

See All