How to Use an Lcd Screen With an Arduino

3,570

41

4

Introduction: How to Use an Lcd Screen With an Arduino

Have you ever needed a way to display some important data from your arduino. Well in this tutorial I'll teach you how to accomplish that using a 16x2 lcd screen, so lets get into it.

Step 1: Supplies Needed

1. 16x2 LCD Screen with Male Headers*

2. 220 or 330 ohm resistor

3. 10k Potentiometer

4. Arduino

5. Breadboard and Jumper wires

All of these parts are fairly cheap and are all under $5 dollars (Except for the Arduino). I have included a link for the lcd screen, and the other parts can be found at a radioshack, ebay, or amazon.

*The male headers on the lcd screen have to be soldered on yourself, but if your not too confindent in your skills you can spend a few extra bucks and buy one with soldered on headers.

Step 2: The Circuit

The circuit for this project is fairly simple and won't take long, so grab your breadboard, arduino, and jumper wires and let's get into it.

Here is where each pin connects to.

LCD -------ARDUINO

VCC ----GND

VDD ----5V

V0 ---- POT

RS ----D12

R/W ----GND

E ----D11

D4 ----D5

D5 ----D4

D6 ----D3

D7 ----D2

A & 330 Ω ----5V

K ----GND

Now plug in your arduino and if your lcd screen lights up congrats, now adjust you pot until you see some random symbols, which means you have no code uploaded.

If your lcd screen doesn't turn on check your wire connections and your solder connections.

Step 3: The Code

Were almost done now, all we have to do is write this simple program and upload it.

// Includes the arduino lcd library
#include <LiquidCrystal.h>

// Tells what pins to use

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {

// Sets clears the lcd screen

lcd.clear();

// Tells the arduino the type of lcd screen

lcd.begin(16, 2);

// Tells the arduino what to print to the lcd screen

lcd.print("Hello World"); }

void loop() {

// prints the text in the top left of the screen

lcd.setCursor(0,0);

}

So just copy and paste the code and upload it to your arduino, and your done!

Step 4: Your Done!!

Congrats you finished!!

You can now go and display all of your important information and make the best arduino project ever!!

If you want some more advanced code go Here.

If you some reason your lcd screen isn't working go check your code and wiring.

This is the end of my project now go get creating!

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    4 Discussions

    0
    StephanoH
    StephanoH

    3 years ago

    Why everybody repeat the same Arduino examples tutorials?

    0
    chrisjlionel
    chrisjlionel

    Reply 3 years ago

    Still its getting featured

    0
    ERIC007007
    ERIC007007

    Reply 3 years ago

    nothing new.

    0
    Swansong
    Swansong

    3 years ago

    That looks good, thanks for sharing :)