john saho
Published © GPL3+

LCD Interfacing with Arduino

Connecting an LCD display to an Arduino Uno.

BeginnerFull instructions provided30 minutes925
LCD Interfacing with Arduino

Things used in this project

Hardware components

SparkFun LCD Display 16x2 character
×1
Arduino uno R3
×1
jumper wires
×1
Bread Board
×1
usb cable
×1
10k potentiometer
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Circuit Diagram

Code

The Circuit

Arduino
The circuit:

* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* LCD GND pin to ground
* LCD Vcc pin to 5V
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)

LCD Display

Arduino
#include <LiquidCrystal..h>

// LiquidCrystal lcd( RS, EN, D4,D5, D6, D7)
LiquidCrystal lcd (12, 11, 5, 4, 3, 2); 
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
}

void loop() {
// set the cursor to column 0, line 0
lcd.setCursor(0, 0);
//print Hello
lcd.print(" Hello!");
// set the cursor to column 0, line 1
lcd.setCursor(0, 1);
//print Knackminds
lcd.print(" Knackminds");
}

Set up code explanation

Arduino
void loop() {
// set the cursor to column 0, line 0
lcd.setCursor(0, 0);
lcd.print(" Hello!");
// set the cursor to column 0, line 1
lcd.setCursor(0, 1);
lcd.print(" Knackminds");
}

Code snippet #3

Plain text
#include <LiquidCrystal..h>

// LiquidCrystal lcd( RS, EN, D4,D5, D6, D7)
LiquidCrystal lcd (12, 11, 5, 4, 3, 2); 
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
}

void loop() {
// set the cursor to column 0, line 0
lcd.setCursor(0, 0);
//print Hello
lcd.print(" Hello!");
// set the cursor to column 0, line 1
lcd.setCursor(0, 1);
//print Knackminds
lcd.print(" Knackminds");
}

Credits

knackminds

Posted by john saho
Thanks to knackminds.

Comments