Header Ads

How to display anything on 16X2 LCD Display

 
How to display anything on 16X2 LCD Display

Component Required

  • Arduino Uno
  • 16X2 LCD 
  • Potentiometer for Contrast Control
  • Jumper Wire

Arduino Code

// include the library code:
#include <LiquidCrystal.h>

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 4, d5 = 5, d6 = 6, d7 = 7;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, Abhishek");
}

void loop() {
  // Turn off the display:
  lcd.noDisplay();
  delay(500);
  // Turn on the display:
  lcd.display();
  delay(500);
}

Schematic

Interfacing Diagram


No comments:

Popular Posts

Theme images by 5ugarless. Powered by Blogger.