How did I use the Ardunio LCD shield without documentation

Working with Arduino LCD Display
16×2 LCD is the simplest form of visual output from Arduino
[time_elapsed_string] [reading_time]


I did not know why I was buying the LCD shield. It looked like a good output device to do variety of stuff with the Arduino.


I downloaded three examples from their website. That is all the documentation they had. You can find three examples below. In next steps I will run you through my thinking process on how I deciphered the examples to create my own mini-documentation to work with the LCD.

Before proceeding any further, please read through the codes once. You do not need prior coding experience. Just an analytical mind is sufficient.

Example 1: Bar chart, Moving display
Example 2: Button test, Time display
Example 3: Mini game of guessing the number using button and display


Understanding the Sample Code


<CODE> #include <LiquidCrystal.h>
<CODE> #include <LCDKeypad.h>

#include is the instruction for the compiler to include a library. A library is required for the compiler to make a meaning out of the code. Get a sense of what a library does in wikipedia.

So, now we know we need two libraries LiquidCrystal.h and LCDKeypad.h . We can safely assume that LiquidCrystal.h includes various functions to operate the display and the LCDKeypad.h has functions to operate the 5 button keypad.

<CODE> LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

It seems that pins 8,9,4,5,6,7 are being used by the LCD shield to communicate with the Arduino board. Note for self: If I use any

<CODE> void setup() { ...some code...
<CODE> lcd.begin(16, 2);
<CODE> ... more code...}




Creating first code from scratch

This was enough

First code : Display custom message on LCD from Arduino

Leave a Reply

Your email address will not be published. Required fields are marked *