/*
1). LCD pins:
(1,3,5,16)th pins to ground,
3 no. pin through Registor
2).(2,15)th to 5V(Vcc)
3).(RS,E, D4,D5,D6,D7):
to Arduino Digital pins
*/
#include<LiquidCrystal.h>
// including the Library (LiquidCrystal) for LCD
const int rs=12, en =11, d4 = 5, d5 =4,d6 =3, d7=2;//
// assigning a variable name to each pins connected to Arduino
// Methods: DataType(int for integer type variable)variableName = pin no.;
LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
// Library variableName(name of device_pins which is conected to Arduino)
void setup() {
Serial.begin(9600);
lcd.begin(16,2);// LCD type: 16 column and 2 rows
}
void loop() {
//(Column index:0-15; row index:0= 1st row,1=2nd row;)
lcd.setCursor(1,1);
//setCursor(1,1) is a Library Function,where we passing the arguments 1,0
lcd.print("Hello World!");
lcd.setCursor(0,0);
lcd.print("Welcome");
delay(1000);
lcd.blink();
//lcd.clear();
//lcd.scrollDisplayLeft();
delay(500);
//scrollDisplayLeft() is a Library Function
}