Appearance

Dark Light

Did You Know?

Conventional farmers use around 300 different pesticides to grow foods that are sold in supermarkets everyday.

Arduino LCD

The Arduino LiquidDisplay library lets you control Hitachi HD44780 compatible LCDs. These are inexpensive displays that are quite common. (I got mine from eBay, $3-5 each). This project uses a 2x16 LCD.

Parts:


The LCD can be driven with either 4 or 8 data pins. If using 4, the first 4 pins can be ignored (DB0-DB3). The LiquidDisplay() constructor takes a number of parameters:


LiquidCrystal(rs, rw, enable, d4, d5, d6, d7) 
I have it connected as follows:

LCDArduino
1 (GND)GND
2 (VDD)5v
3 (VO/Contrast)GND
4 (RS)2
5 (RW)3
6 (E/enable)4
11 (DB4)9
12 (DB5)10
13 (DB6)11
14 (DB7)12
15 (BL1/Backlight1)5v
16 (BL2/Backlight2)GND

Code


#include 

LiquidCrystal lcd(2,3,4,9,10,11,12);

void setup() {
  lcd.begin(16,2);
  lcd.setCursor(0,0);
  lcd.print("Arduino");
  lcd.setCursor(0,1);
  lcd.print("Rocks!");
}

void loop() {
  delay(5000);
}


For more info, see: LiquidCrystal Library