All LCD Functions using Arduino

If you are here on this site, that means you have started exploring Arduino Board and looking for some help with LCD display. You are exactly at the right place.

In this demo, I will show you most of the LCD functions supported by LiquidCrystal Library with Arduino Board using one LCD display. Three LCD demos are already posted on my blog which you can visit here. (Program 1Program 2 and Program 3)LiquidCrystal Library is very powerful library and most of the functions are available in the library which can be called and used in the Arduino program.

Before this, You must know the basic understanding of Pins of LCD, their functions and how to connect them on Arduino Board. (Please visit here)

Program on Arduino Software

You can copy and paste whole program from here.

Compile it and Upload it on Arduino Board and observe the output on LCD.

//Program starts here

#include

LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

void setup() {
// put your setup code here, to run once:
lcd.begin(16,2);
lcd.clear();
}

void loop() {
// put your main code here, to run repeatedly:
lcd.clear();
lcd.print(“Start Printing”);
delay (3000);
lcd.setCursor(0,1);
lcd.print(“Setting Cursor”);
delay(3000);
lcd.clear();
lcd.print(“Start Blinking”);
lcd.blink();
delay (3000);
lcd.clear();
lcd.noBlink();
lcd.print(“uline cursor”);
lcd.cursor();
delay (3000);
lcd.clear();
lcd.print(“no cursor”);
lcd.noCursor();
delay (3000);
lcd.clear();
lcd.print(“no Display”);
delay (3000);
lcd.noDisplay();
delay (3000);
lcd.clear();

lcd.print(” Display On”);
delay (3000);
lcd.display();

delay (3000);
}

//Program ends here

Explanation of Program:

If you have gone through (Program 1Program 2 and Program 3) then you must be knowing basic LCD functions like lcd.begin(), lcd.clear(), lcd.setCursor(); lcd.print()

there are few more functions which i am explaining here.

lcd.blink() will  blink a block-style cursor

lcd.noBlink() will  stop blinking a block-style cursor

lcd.cursor() will put an underscore-style cursor

lcd.noCursor() will remove the cursor which was placed using lcd.cursor() function

lcd.noDisplay() will turn off the LCD display without losing the text currently shown on it.

lcd.display() will bring back the display with existing texts on it.

Demo of the Program

The below snapshot shows one of the function running on LCD Display.

lcdfunction

Please look at the whole demonstration on Youtube.

-Signing Off, Arduino Novice

Please do follow my Blog and subscribe to my Youtube Channel for more demos and videos related to Arduino.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s