21, Feb, 2019

Connect Arduino with LCD 16X2 display program

arduino 16x2 lcd display

A sample program to connect Arduino UNO with 16X2 LCD display

Refer ARDUINO I2C SCANNER CODE

Library : LiquidCrystal.h – can be downloaded from https://drive.google.com/file/d/0B-H_CXR7-MD9TXhQOGdHdTYxUE0/view?usp=sharing

Sample Program

#include <LiquidCrystal.h>

//initialize the library by providing the number of pins to it
LiquidCrystal lcd(8,9,4,5,6,7);
void setup() {
lcd.begin(16,2);
// set cursor position to start of first line on the LCD
lcd.setCursor(0,0);
//text to print
lcd.print(“COUNTER”);
delay(100);
int a=0;
lcd.setCursor(0,1);
lcd.print(” “);
lcd.print(a);
while(a<=100)
{
a=a+1;
delay(1000);
lcd.setCursor(0,1);
lcd.print(” “);
lcd.print(a);
}
}
void loop()
{
lcd.clear();
}

arduino and 16 x 2 lcd display sample program

1 Comment

    kevin

    February 10, 2019 at 6:14 pm
    Reply

    arduino vb.net

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>