Q.No.6 - Write a program to display Hello World on LCD (16*2 LCD).

Sol.-

#include 
LiquidCrystal lcd(2,3,4,5,6,7);
void setup()
{
  lcd.begin(16,2);
}
void loop()
{ 
  lcd.setCursor(0,0);
  lcd.print("Hello World !"); 
}


Explain : Step 1: First we add library of lcd display screen. Step 2: LCD pin (2,3,4,5,6,7) Pins connections:- LED- connected to ground having resistor 1kilo ohm. LED- connnected to ground. DB7- to Digital pin 7 DB6- to pin no. 6 DB5- to pin no. 5 DB4- to pin no. 4 E(Enable)- to pin no. 3 R/W (read/write)- ground connection RS - pin no. 2 V0 - ground with resistor 330 ohm VCC- power 5v Gnd- ground. Step 3: void setup() initialize lcd(16,2) Step 4: set the loop. setCursor(0,0)- means first (columns, row).

OUTPUT: