Founder of KingKodes.
In this tutorial, we will guide you to connect a 16*2 LCD with an Arduino and display some texts. By the end of this tutorial, you'll be able to set up your Arduino and write a basic program to display text on the LCD screen.
1// include the library code:
2#include <LiquidCrystal.h>
3
4//LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
5LiquidCrystal lcd(12, 11, 4, 5, 6, 7); // put your pin numbers here
6
7void setup() {
8 lcd.begin(16, 2); // put your LCD parameters here
9 lcd.setCursor(0,0);
10 lcd.print("Good Morning USA");
11 lcd.setCursor(0,1);
12 lcd.print("Land of the free.") ;
13
14}
15void loop(){}