Arduino Lesson 11. LCD Displays - Part 1

Similar documents
Arduino Lesson 14. Servo Motors

Arduino Lesson 13. DC Motors. Created by Simon Monk

Arduino Lesson 9. Sensing Light

Arduino Lesson 0. Getting Started

Arduino Lesson 1. Blink

Character LCDs. Created by Ladyada. Last updated on :45:29 PM EDT

Arduino Lesson 5. The Serial Monitor

Arduino Lesson 4. Eight LEDs and a Shift Register

Arduino Lesson 16. Stepper Motors

Arduino Lesson 17. Sending Movement Detector

2.2" TFT Display. Created by Ladyada. Last updated on :15:09 PM EDT

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

Drive a 16x2 LCD with the Raspberry Pi

DEPARTMENT OF ELECTRONICS ENGINEERING

Adafruit SHT31-D Temperature & Humidity Sensor Breakout

LCD I 2 C/Serial RX Backpack. Data Sheet. LCD to I2C/Serial RX Backpack I2C or Serial RX communication with Standard 16 Pin LCD modules

Adafruit's Raspberry Pi Lesson 11. DS18B20 Temperature Sensing

Home Security System for Automatic Doors

1.8" TFT Display Breakout and Shield

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

Your Multimeter. The Arduino Uno 10/1/2012. Using Your Arduino, Breadboard and Multimeter. EAS 199A Fall Work in teams of two!

Playing sounds and using buttons with Raspberry Pi

Adafruit's Raspberry Pi Lesson 9. Controlling a DC Motor

2.3" Monochrome 128x32 OLED Display Module

Set up and Blink - Simulink with Arduino

DS1307 Real Time Clock Breakout Board Kit

Adafruit BME280 Humidity + Barometric Pressure + Temperature Sensor Breakout

A REST API for Arduino & the CC3000 WiFi Chip

SSH to BeagleBone Black over USB

BUILDING INSTRUCTIONS

Tiny Arduino Music Visualizer

ENGI E1112 Departmental Project Report: Computer Science/Computer Engineering

Company Setup 401k Tab

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable

Accounts Payable Expense Distribution Tables

1.5" & 2.1" Monochrome 128x64 OLED Display Module

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable

Microcontroller Display Interfacing Techniques

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

1602 LCD adopts standard 14 pins(no backlight) or 16pins(with backlight) interface, Instruction of each pin interface is as follows:

Using an IR Remote with a Raspberry Pi Media Center

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable. Created by Simon Monk

EARTH PEOPLE TECHNOLOGY SERIAL GRAPH TOOL FOR THE ARDUINO UNO USER MANUAL

Matrix and 7-Segment LED Backpack with the Raspberry Pi

SainSmart UNO R3 Starter Kit

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

Adding a Real Time Clock to Raspberry Pi

Adafruit Proto Shield for Arduino

Sending an SMS with Temboo

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

Parallax Serial LCD 2 rows x 16 characters Non-backlit (#27976) 2 rows x 16 characters Backlit (#27977) 4 rows x 20 characters Backlit (#27979)

MCP4725 Digital to Analog Converter Hookup Guide

How To Control A Car With A Thermostat

Beginner s Guide to the PI MATRIX. by Bruce E. Hall, W8BH 1) INTRODUCTION

AXE033 SERIAL/I2C LCD

cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller

Thermistor. Created by Ladyada. Last updated on :30:46 PM EDT

Lesson 8: Simon - Arrays

Kurz MODBUS Client User s Guide

The self-starting solar-powered Stirling engine

CM HOST CM CardTransporter Fuel Communication and Management Software Software version up to 3.1

BV4512. I2C-LCD- 128 x 64 Graphic Controller. Product specification. November 2008 V0.a. ByVac Page 1 of 14

Computer Architectures

To Begin Customize Office

Yun Shield Quick Start Guide VERSION: 1.0 Version Description Date 1.0 Release 2014-Jul-08 Yun Shield Quick Start Guide 1 / 14

TSL2561 Luminosity Sensor

All About Arduino Libraries

Arduino Lab 1 - The Voltage Divider

PolyBot Board. User's Guide V1.11 9/20/08

Cart Interface Installation & Control Board Manual for M38 XP and RX Carts and Legacy M39 Carts

Monitor Your Home With the Raspberry Pi B+

Pololu DRV8835 Dual Motor Driver Shield for Arduino

Customer Pole Display SERIES 8035

Arduino DUE + DAC MCP4922 (SPI)

Creating a Project with PSoC Designer

Intro to Intel Galileo - IoT Apps GERARDO CARMONA

PICmicro tm Development Board

Electronics 5: Arduino, PWM, Mosfetts and Motors

CAN-Bus Shield Hookup Guide

RGB LED Strips. Created by lady ada. Last updated on :00:18 PM EST

Lab 3 Rectifier Circuits

Surveillance System Using Wireless Sensor Networks

H-Bridge Motor Control

IR Communication a learn.sparkfun.com tutorial

ARDUINO SEVERINO SERIAL SINGLE SIDED VERSION 3 S3v3 (REVISION 2) USER MANUAL

WebIOPi. Installation Walk-through Macros

USB + Serial RGB Backlight Character LCD Backpack

Waspmote. Quickstart Guide

RS232 Board datasheet

Executive Summary. Table of Contents

EvB 5.1 v5 User s Guide

TEECES DOME LIGHTING SYSTEMS

Adafruit NFC/RFID on Raspberry Pi

Board also Supports MicroBridge

Lab 6 Introduction to Serial and Wireless Communication

Animated Lighting Software Overview

COUNTY OF MENDOCINO. How to Set Up a Recurring Journal Entry. Created by: Auditor-Controller

An Introduction To Simple Scheduling (Primarily targeted at Arduino Platform)

SMS Alarm Messenger. Setup Software Guide. SMSPro_Setup. Revision [Version 2.2]

Transcription:

Arduino Lesson 11. LCD Displays - Part 1 Created by Simon Monk Last updated on 2013-06-11 08:30:45 PM EDT

Guide Contents Guide Contents Overview Parts Part Qty Breadboard Layout Soldering Pins to the Display Arduino Code Other Things to Do 2 3 4 4 4 6 7 8 10 Adafruit Industries http://learn.adafruit.com/adafruit-arduino-lesson-11-lcd-displays-1 Page 2 of 10

Overview In this lesson, you will learn how to wire up and use an alphanumeric LCD display. The display has an LED backlight and can display two rows with up to 16 characters on each row. You can see the rectangles for each character on the display and the pixels that make up each character. The display is just white on blue and is intended for showing text. In this lesson, we will run the Arduino example program for the LCD library, but in the next lesson, we will get our display to show the temperature and light level, using sensors. Adafruit Industries http://learn.adafruit.com/adafruit-arduino-lesson-11-lcd-displays-1 Page 3 of 10

Parts To build the project described in this lesson, you will need the following parts. Part Qty LCD Display (16x2 characters) 1 10 kω variable resistor (pot) 1 Half-size Breadboard 1 Adafruit Industries http://learn.adafruit.com/adafruit-arduino-lesson-11-lcd-displays-1 Page 4 of 10

Arduino Uno R3 1 Jumper wire pack 1 Adafruit Industries http://learn.adafruit.com/adafruit-arduino-lesson-11-lcd-displays-1 Page 5 of 10

Breadboard Layout The LCD display needs six Arduino pins, all set to be digital outputs. It also needs 5V and GND connections. There are quite a few connections to be made. Lining up the display with the top of the breadboard helps to identify its pins without too much counting, especially if the breadboard has its rows numbered with row 1 as the top row of the board. Do not forget, the long yellow lead that links the slider of the pot to pin 3 of the display. The 'pot' is used to control the contrast of the display. You may find that your display is supplied without header pins attached to it. If so, follow the instructions in the next section. Adafruit Industries http://learn.adafruit.com/adafruit-arduino-lesson-11-lcd-displays-1 Page 6 of 10

Soldering Pins to the Display The display needs 16 pins, so if your header strip is longer than that then break it off to the right length. Then put the length of 16 header pins into the solder tabs on the display and starting at one end, solder each of the pins in place. It can be easier to put the long end of the pins into the breadboard so that the header pins are held straight. If you do not do this, then solder one pin in first and then get the pins in straight, melting the solder on the pin before making any adjustment. Adafruit Industries http://learn.adafruit.com/adafruit-arduino-lesson-11-lcd-displays-1 Page 7 of 10

Arduino Code The Arduino IDE includes an example of using the LCD library which we will use. You can find this on the File menu under Examples Liquid Crystal HelloWorld. This example uses different pins to the ones we use, so find the line of code below: LiquidCrystal lcd(12, 11, 5, 4, 3, 2); and change it to be: LiquidCrystal lcd(7, 8, 9, 10, 11, 12); Upload the code to your Arduino board and you should see the message 'hello, world' displayed, followed by a number that counts up from zero. The first thing of note in the sketch is the line: #include <LiquidCrystal.h> This tells Arduino that we wish to use the Liquid Crystal library. Next we have the line that we had to modify. This defines which pins of the Arduino are to be connected to which pins of the display. LiquidCrystal lcd(7, 8, 9, 10, 11, 12); The arguments to this are as follows: Display Pin Name Display Pin Number Arduino Pin (in this example) RS 4 7 E 6 8 D4 11 9 D5 12 10 D6 13 11 Adafruit Industries http://learn.adafruit.com/adafruit-arduino-lesson-11-lcd-displays-1 Page 8 of 10

D7 14 12 After uploading this code, make sure the backlight is lit up, and adjust the potentiometer all the way around until you see the text message In the 'setup' function, we have two commands: lcd.begin(16, 2); lcd.print("hello, world!"); The first tells the Liquid Crystal library how many columns and rows the display has. The second line displays the message that we see on the first line of the screen. In the 'loop' function, we aso have two commands: lcd.setcursor(0, 1); lcd.print(millis()/1000); The first sets the cursor position (where the next text will appear) to column 0 & row 1. Both column and row numbers start at 0 rather than 1. The second line displays the number of milliseconds since the Arduino was reset. Adafruit Industries http://learn.adafruit.com/adafruit-arduino-lesson-11-lcd-displays-1 Page 9 of 10

Other Things to Do Try pressing the Reset button on the Arduino, notice that the count goes back to 0. Try moving the position where the count is displayed to near the middle of the second row of the display. About the Author Simon Monk is author of a number of books relating to Open Source Hardware. The following books written by Simon are available from Adafruit: Programming Arduino (http://adafru.it/1019), 30 Arduino Projects for the Evil Genius (http://adafru.it/868) and Programming the Raspberry Pi (http://adafru.it/am5). Adafruit Industries Last Updated: 2013-06-11 08:30:47 PM EDT Page 10 of 10