In this tutorial we will see how to display text in an LCD display with Arduino.
1602 LCD I2C display:
The 16×2 text display is used to display sensor information, display menus or prompts. The screen displays black characters with a size of 5×8 pixels. The built-in backlight is turned on by applying power to the module pins. The 16×2 text display without IIC module is connected to the microcontroller by 16 pins. The pinout of the 1602a display with a connection example is shown in the image below.
The liquid crystal display has two rows of 16 characters, hence its name LCD 1602. The device memory has 192 characters, an additional 8 characters can be defined by the user. If you connect the display without an IIC module, you will need to use 6 general purpose ports at the Arduino microcontroller, not including the power supply. Assemble the circuit and load the following program into the board.
To complete the assembly you must connect:
Here is the program to display text on the LCD display.
LiquidCrystal_I2C lcd(0x27, 20, 4);
lcd.init(); //display initialization
lcd.backlight(); // activate the backlight
lcd.setCursor(0, 0); // stand in the front line
lcd.print(" Carte"); // Display the word 'card' on the I2C LCD 1602 display
lcd.setCursor(0,1); // stand on the second line
lcd.print(" Arduino"); // Display the word 'Arduino'
Note: You must download the LiquidCrystal_I2C library(Download).