Reader small image

You're reading from  Learning C for Arduino

Product typeBook
Published inMar 2017
Reading LevelBeginner
PublisherPackt
ISBN-139781787120099
Edition1st Edition
Languages
Right arrow
Author (1)
Syed Omar Faruk Towaha
Syed Omar Faruk Towaha
author image
Syed Omar Faruk Towaha

Syed Omar Faruk Towaha is a data scientist, and currently working at Meta. He has two bachelor's degrees, one in Physics, another in Computer Science and a Master's in Data Science. He is based in London, England, and has interests in data science and IoTs. While Syed is not busy with his jobs, he uses his time to write something about new technologies. His recent publications include Building Smart Drones With ESP8266 and Arduino, Introduction to Rust Programming, Learning C for Arduino, and JavaScript Projects for Kids.
Read more about Syed Omar Faruk Towaha

Right arrow

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

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Learning C for Arduino
Published in: Mar 2017Publisher: PacktISBN-13: 9781787120099

Author (1)

author image
Syed Omar Faruk Towaha

Syed Omar Faruk Towaha is a data scientist, and currently working at Meta. He has two bachelor's degrees, one in Physics, another in Computer Science and a Master's in Data Science. He is based in London, England, and has interests in data science and IoTs. While Syed is not busy with his jobs, he uses his time to write something about new technologies. His recent publications include Building Smart Drones With ESP8266 and Arduino, Introduction to Rust Programming, Learning C for Arduino, and JavaScript Projects for Kids.
Read more about Syed Omar Faruk Towaha