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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.