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 ...

Get Learning C for Arduino now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.