Uses of LiquidCrystal Library
We use the LiquidCrystal
library for controlling Liquid Crystal Displays (LCDs). The Liquidcrystal
library works best with the Hitachi HD44780 chipset embedded on the LCD displays. This chipset is too common to the text-based displays (cannot display any complex graphics). We have connected the 16x2 LCD display to the Arduino that supports the LiquidCrystal
library. To print something on the Display we will first need to import the liquidcrystal.h
library to the code as follows:
#include <LiquidCrystal.h>
Now we will define the pins of the Arduino board that we have used to connect the LCD display:
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
Here lcd
can be renamed to anything you want. But remember we will need to use this in the future code.
Inside the setup()
function we will say what kind of display we have connected to the Arduino board as follows:
lcd.begin(16,2);
Our display is 16x2, so we have declared our display with the column numbers and row numbers of...