The LiquidCrystal library allows you to control LCD displays that are compatible with the Hitachi HD44780 driver. There are many of them out there, and you can usually tell them by the 16-pin interface.
This example sketch prints “Hello World!” to the LCD and shows the time in seconds since the Arduino was reset.
To wire your LCD screen to your Arduino, connect the following pins:
- Lcd Pin 1 (Rss) – Arduino Ground
- Lcd Pin 2 (Vdd) – Arduino +5V
- Lcd Pin 3 (Vo) – Middle Pin of Potentiometer 10K
- Lcd Pin 4 (Rs) – Arduino Pin 12
- Lcd Pin 5 (Rw) – Arduino Ground
- Lcd Pin 6 (E) – Arduino Pin 11
- Lcd Pin 7-10 – NC
- Lcd Pin 11 (D4) – Arduino Pin 5
- Lcd Pin 12 (D5) – Arduino Pin 4
- Lcd Pin 13 (D6) – Arduino Pin 3
- Lcd Pin 14 (D7) – Arduino Pin 2
- Lcd Pin 15 (A) – Arduino 3.3V
- Lcd Pin 16 (K) – Arduino Ground
- Don’t forget to connect and the other 2 pins of potentiometer to Ground and +5V.
Additionally, wire a 10K pot to +5V and GND, with it’s wiper (output) to LCD screens VO pin (pin3).