Thursday, February 24, 2011

Write from Arduino to LCD


 Scheme Description:
  • Connect the LCD RS pin to the Arduino pin 12
  • Connect the LCD enable pin to the Arduino pin 11 
  • Connect the LCD D4 to D7 pins into pin 5 to 2 Arduino
  • Connect the LCD +5 and ground to pin +5 V and ground Arduino
  • Connect the pin to a potentiometer LCD Vo. Use of this potentiometer is to adjust the LCD contrast
In this Project, we will write " Hello World " from arduino to LCD

Program Arduino:
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// LCD Demo Program
// Use LCD library
#include "LiquidCrystal.h";
// LCD initialization & use pin
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
  // Set the numbers of LCD columns and rows
  lcd.begin(16, 2);
  // Make the writing on the LCD
  lcd.print("hello, world!");
}
void loop() {
  // Set cursor to Column 0 & Row 1
  // Note: Column & Row starting with 0
  lcd.setCursor(0, 1);
  // Print the number of seconds since last reset
  lcd.print(millis()/1000);
}





No comments:

Post a Comment