Programming Examples

Arduino program to interface LCD with Arduino board and print some text


LCD to print 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


Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2024 Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz