//16*2 LCD Display Code //SurtrTech channel //Code for displaying a message on the screen for 2s then erase the screen for 2s #include //Libraries needed #include #include #define I2C_ADDR 0x27 //I2C address, you should use the code to scan the address first (0x27) here #define BACKLIGHT_PIN 3 // Declaring LCD Pins #define En_pin 2 #define Rw_pin 1 #define Rs_pin 0 #define D4_pin 4 #define D5_pin 5 #define D6_pin 6 #define D7_pin 7 LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin); void setup() { lcd.begin (16,2); lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE); lcd.setBacklight(HIGH); //Lighting backlight lcd.home (); } void loop() { lcd.setCursor(0,0); //Setting the position where you want to start writing the message (0,0) is top left lcd.print("Tuesday"); //Message to display lcd.setCursor(10,1); //Start writing on the position (10,1) lcd.print("Hello"); delay(2000); //Display time lcd.clear(); //Clearing the screen delay(2000); //Blank screen time }