LCD Message Display Using Arduino and I2C LCD
LCD Message Display Using Arduino and I2C LCD
Partial Requirements
Date:
06/11/2024
Submitted by:
LAWRENCE J. VILLACORTE
BSIT - 2B
Submitted to:
Description:
This project uses an I2C-connected 16x2 LCD display to show the message "Hello
World!!". The microcontroller initializes the LCD and enables the backlight, then sets the
cursor to display "Hello" on the top row and "World!!" on the bottom row. This
demonstrates how to interface with an LCD using the I2C protocol for clear, simple text
output.
BILL OF MATERIALS:
Item Number Parts Name Quantity Cost Each (PHP) Cost Extended
(PHP)
3 Jumper Wire 4 7 28
CODES:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
void setup() {
lcd.begin(16,2);
lcd.backlight();
}
void loop() {
lcd.setCursor(5, 0);
lcd.print("Hello");
lcd.setCursor(4, 1);
lcd.print("World!");
}
SUMMARY:
This project demonstrates how to interface a 16x2 LCD screen with a microcontroller
using the I2C protocol, allowing for efficient control with only two data lines. The code
initializes the LCD with an I2C address (in this case, `0x27`), sets it up for 16 columns and 2
rows, and enables the backlight to improve readability. Once initialized, the program displays
the message "Hello" in the center of the top row and "World!!" in the center of the bottom
row, using precise cursor positioning for a neatly formatted output.
This project introduces the basics of I2C communication and LCD display control,
including commands for setting the cursor position and managing the backlight. It’s a great
starting point for projects that require user-friendly text output, such as simple menus,
notifications, or status displays, and can be extended to show sensor data or other dynamic
information.