Data Sheet
74 : circuit 4a
PROGRAM OVERVIEW
Import the LCD library.
Make an LCD object called “lcd” that will be controlled using pins 8, 9, 10, 11, 12 and 13.
“Begin” the LCD. This sets the dimensions of the LCD that you are working with (16 x 2). It needs to be
called before any other commands from the LCD library are used.
Clear the display.
Set the cursor to the top left corner lcd.setCursor(0,0); then print “Hello, world!"
Move the cursor to the first space of the lower line lcd.setCursor(0,1); then print the number of
seconds that have passed since the RedBoard was last reset.
WHAT YOU
SHOULD SEE
The LCD screen will show
“Hello, world!” and on the row
below a counter will count
every second that passes.
Adjusting the potentiometer
will change the contrast on the
LCD screen.
Open the Arduino IDE
Connect the RedBoard to a USB port on your computer.
Open the Sketch:
File > Examples > SIK_Guide_Code-V_4 > CIRCUIT_A-LCD HELLO WORLD
Select UPLOAD to program the sketch on the RedBoard.
SIK v4 Book Oct 13.indb 74 10/18/17 10:01 AM