2015/04/04

Arduino Uno LCD Sample

This is a quick tutorial on how to wire up the QC1602A LCD to Arduino Uno and program the Arduino Uno to display "Hello World!".


1.      Wiring Diagram

2.      Code

#include <LiquidCrystal.h>

LiquidCrystal lcd(9, 8, 7, 6, 5, 4); // pins for RS, Enable, D4, D5, D6, D7

void setup() {

  lcd.begin(16, 2);
  lcd.clear();

}

void loop() {

  lcd.setCursor(5, 0);
  lcd.print("Hello");
  lcd.setCursor(6, 1);
  lcd.print("World!");
  delay(2500);
  lcd.clear();
  delay(2500);
}

3.      Output Result



No comments:

Post a Comment