Programming Examples
Arduino program to interface LCD with Arduino board and print some text
Write a program to interface LCD with Arduino board and display ''This is Covid-19 Pandemic always wear the mask" on it.
Solution
#include <LiquidCrystal.h>
int seconds = 0;
LiquidCrystal lcd_1(12, 11, 5, 4, 3, 2);
void setup()
{
lcd_1.begin(16, 2); // Set up the number of columns and rows on the LCD.
// Print a message to the LCD.
lcd_1.print("");
}
void loop()
{
lcd_1.clear();
lcd_1.print("This is Covid-19 ");
lcd_1.setCursor(0, 1);
lcd_1.print("Pandemic always ");
delay(1000); // Wait for 1000 millisecond(s)
lcd_1.clear();
lcd_1.setCursor(0, 0);
lcd_1.print("wear the mask ");
lcd_1.setCursor(0, 1);
lcd_1.print("- INFOMAX");
delay(1000);
}
Output