LCD Arduino Shield

4.9K379

Intro: LCD Arduino Shield

Today, I will be showing you how to use a LCD shield to display text using an Arduino. It is very easy.

Things you will need

1 Arduino UNO
1 LCD shield

STEP 1: Assemble

Well, this is easy.

STEP 2: Add Code

Just paste this in the Arduino IDE

#include

// LiquidCrystal Print

// by Peyt52

LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);

void setup()

{

lcd.clear();

lcd.begin(16, 2);

}

void loop()

{

lcd.setCursor(0, 0);

lcd.print(""); //First line of text

lcd.setCursor(0, 1);

lcd.print(""); //Second line of text

}

I hope that was easy enough. Ask questions in the comments!

9 Comments

Please update and correct your code

The correct code is:

// LiquidCrystal Print

// by Conor M

#include <LiquidCrystal.h>

LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);

void setup()

{

lcd.clear();

lcd.begin(16, 2);

}

void loop()

{

lcd.setCursor(0, 0);

lcd.print("INSERT TEXT HERE"); //First line of text

lcd.setCursor(0, 1);

lcd.print("INSERT TEXT HERE"); //Second line of text

}

Hi,

when I upload the code, the following errors appear:

lcd1.ino:1:10: error: #include expects "FILENAME" or <FILENAME>

lcd1.ino:7:1: error: 'LiquidCrystal' does not name a type

lcd1.ino: In function 'void setup()':

lcd1.ino:13:1: error: 'lcd' was not declared in this scope

lcd1.ino: In function 'void loop()':

lcd1.ino:23:1: error: 'lcd' was not declared in this scope

could you please help me?

Your code is wrong. It doesn't work

Help please

thanks

hi , like a add a switch status on - off

I do not know how to write the status of my interuteur , OPEN or close. the screen. pouver you helped me ? thank you for avence . thx

Oh yes! In the picture, do you see the little blue box in the upper left hand corner? There is a silver knob on top of it with a little slit it. You can use your finder nail or a screwdriver to twist it and change the brightness. If I'm right, twisting it left will increase the contrast. I hope I helped!
Hi! As this board to change the brightness?
I'm a bit confused by your question?
Sorry. The second day of looking for how to change the level of illumination of this board :)