instructables
Using 1602 LCD Keypad Shield W/ Arduino [+Practical Projects]
by Electropeak
You can read this and other amazing tutorials on ElectroPeak's official website
Overview
In this tutorial, you’ll learn how to use Arduino LCD keypad shield with 3 practical projects.
What You Will Learn:
How to set up the shield and identify the keys
How to scroll text
How to display special characters
Using 1602 LCD Keypad Shield W/ Arduino [+Practical Projects]: Page 1
Step 1: 1602 Arduino LCD Keypad Shield Features
Displaying information in electronic projects has consists of several rows and columns. Letters and
always been the most compelling issue. There are numbers are written in places created by rows and
various ways to display data. These screens can be columns. For example, LCD character 16*2 has 2
so simple such as 7segments or LEDs, or they can rows and 16 columns. So it can display 32
be more fascinating such as LCDs. Using LCDs has characters. Working with these LCDs is very simple
always been one of the most popular ways to display and they have full compatibility with all
information. LCDs are divided into two generic types: microcontrollers and processor boards. For easier
Characters and Graphics. use of these LCDs, its 16x2model, including four keys
for making the menu, is made as a Shield which is
One of the most common, cheapest and simplest also compatible with Arduino boards.
LCDs available is the character LCD. This LCD
Step 2: How to Use Arduino LCD Keypad Shield
Arduino shiels is a user-friendly and simple shield. To use it you need to know its pinout and its connection to
Arduino at first.
Step 3: Required Materials
Arduino Uno R3 ×1
1602 LCD Keypad Shield For Arduino ×1
Software Apps
Arduino IDE
Using 1602 LCD Keypad Shield W/ Arduino [+Practical Projects]: Page 2
Step 4: How to Read the Keys?
In this shield, all 4 keys are connected to the analog Defining the LCD object according to the pins that are
pin 0 to save on digital pins. So we should use ADC connected to Arduino.
to read them. When you press a key, it returns a
value to the A0 pin according to the internal resistive lcd.begin(16, 2);
splitting circuit, which identifies the type of the key.
Initial configuration of the LCD by specifying the
Let’s take a deeper look at the code: number of columns and rows. The first argument is
the number of columns, and the second is the number
of rows.
#include <LiquidCrystal.h>
in the above table are some of the important functions
The library you need for character LCD. to work with LCD.
LiquidCrystal LCD( pin_RS, pin_EN, pin_d4, pin_d5, You can check the Arduino website for more
pin_d6, pin_d7); functions.
Download
https://www.instructables.com/ORIG/F47/DWJZ/JUSNGVO7/F47DWJZJUSNGVO7.ino
…
Step 5: How to Scroll a Text?
We can do it easily using the above functions.
Download
https://www.instructables.com/ORIG/FA0/FV31/JUSNGW03/FA0FV31JUSNGW03.ino
…
Step 6: How to Display a Specific Character?
You can create a character in each block from your LCD. To do this, you should convert your desired character to
an array of codes, then display it on LCD. To convert your character to codes you can use online websites like
this. Design your character, then copy the generated array to your code.
lcd.createChar stores your array in a memory location and you can display it withlcd.write
Using 1602 LCD Keypad Shield W/ Arduino [+Practical Projects]: Page 3
Step 7: What's Next?
Try to create a menu with ability of selecting options.
That shield looks like an interesting bit of kit. Thank you for sharing your intro :-)
Using 1602 LCD Keypad Shield W/ Arduino [+Practical Projects]: Page 4