Write code and Interface 16*2 LCD with Arduino, Display Your Name on First Line of LCD and Registration Number on Second Line of LCD.
Source code
// Include the library:
#include <LiquidCrystal.h>
// Create an LCD object. Parameters:
(RS,E,D4,D5,D6,D7):
LiquidCrystal lcd = LiquidCrystal(2,3,4,5,6,7);
void setup() {
// Specify the LCD's number of
columns and rows.
lcd.begin(16, 2);
}
void loop() {
// Set the cursor on the 3rd column
and the 1st Row, counting starts at zero:
lcd.setCursor(2,0);
// Print the string 'MUHAMMAD IBRAR':
lcd.print("MUHAMMAD
IBRAR");
// Set the cursor on the 4th column
and the 2nd Row for place the Registration Number at mid of lcd :
lcd.setCursor(3,1);
// Print the string 'BAEM-F18-025':
lcd.print("BAEM-F18-025");
}
Result:
0 Comments