0% found this document useful (0 votes)
2 views

arduino report

The report details the practical implementation of interfacing a 16x2 I2C LCD with an Arduino microcontroller, highlighting the objectives, materials, and procedures used. The successful display of text on the LCD confirms the effectiveness of the I2C communication protocol and the LiquidCrystal_I2C library. Troubleshooting steps were also outlined to address potential issues encountered during the practical.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

arduino report

The report details the practical implementation of interfacing a 16x2 I2C LCD with an Arduino microcontroller, highlighting the objectives, materials, and procedures used. The successful display of text on the LCD confirms the effectiveness of the I2C communication protocol and the LiquidCrystal_I2C library. Troubleshooting steps were also outlined to address potential issues encountered during the practical.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Practical report.

GROUPS MEMBERS
1.MOSES KIROBI ED201/108660/21

2.MARTHA MPARU ED201/202324/22

3.ISACK CHEGE ED201/110371/22

4.MOFAT WANGUI ED201/110269/22

5.TECKLA AJENCHE ED201/110459/22

1. Introduction

The practical implementation of interfacing a 16x2 Liquid Crystal Display (LCD) with an Arduino
microcontroller using an I2C communication module. The I2C module simplifies the connection
between the LCD and the Arduino, reducing the number of required pins and streamlining the
display of textual information.

2. Objectives

 To establish a functional connection between an Arduino board and a 16x2 I2C LCD.

 To program the Arduino to display specific text strings on the LCD screen.

 To verify the correct display of information and troubleshoot any potential issues.

3. Materials Required

 Arduino board (e.g., Uno, Nano, Mega)

 16x4 LCD with I2C module

 Jumper wires (for connections)

 Personal Computer with Arduino IDE installed

4. Procedure

4.1 Hardware Setup

 The I2C LCD module was physically connected to the Arduino board.

 The connections were made according to the following pin configuration:


o LCD VCC pin to Arduino 5V pin

o LCD GND pin to Arduino GND pin

o LCD SDA pin to Arduino A4 pin (for Arduino Uno/Nano) or pin 20 (for Arduino
Mega)

o LCD SCL pin to Arduino A5 pin (for Arduino Uno/Nano) or pin 21 (for Arduino
Mega)

 The entire setup was arranged on a suitable workspace to ensure stable connections.

4.2 Software Implementation

 The Arduino IDE was used to write and upload the code to the Arduino board.

 The LiquidCrystal_I2C library was installed through the Arduino IDE's Library Manager.
This library provides the necessary functions to communicate with the I2C LCD.

 The following code was used to display the text:

C++

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

// Initialize the LCD with its I2C address (usually 0x27 or 0x3F)

LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {

lcd.init(); // Initialize the LCD

lcd.backlight(); // Turn on the backlight

lcd.setCursor(0, 0);

lcd.print("Hello, World!");

lcd.setCursor(0, 1);

lcd.print("ISACK MAINA")

lcd.setCursor(0, 2);
lcd.print("ED201/110371/22"); // Added line to display student info

void loop() {

// Nothing here, since we just display static text

 The code initializes the LCD, turns on the backlight, sets the cursor position, and prints
the specified text strings. The lcd.setCursor(0, 1); and lcd.print("ISACK MAINA ")

And lcd.setCursor(0, 2); lcd.print("ED201/110371/22"); lines were added to display the


specific information shown in the image.

 The code was compiled and uploaded to the Arduino board.

5. Results

 The image provided shows the successful display of the text "Hello, World!" on the first
line of the LCD and "ISACK MAINA ED201/110371/22" on the second line.

 This indicates that the Arduino was able to communicate with the I2C LCD and display
the programmed text as intended.

6. Discussion

 The use of the I2C module significantly simplified the wiring, requiring only four
connections (VCC, GND, SDA, and SCL) compared to the more complex parallel wiring of
traditional LCDs.

 The code accurately controls the LCD, allowing for precise placement of text on the
screen.

 The results confirm the effectiveness of the LiquidCrystal_I2C library for interfacing with
I2C LCDs.

7. Troubleshooting

 No major issues were encountered during the practical.

 However, potential troubleshooting steps, as outlined in the provided document,


include:

o Checking the I2C address if the LCD does not display anything.
o Adjusting the contrast potentiometer if the text is not visible.

o Ensuring the correct library and LCD size are used if wrong characters are
displayed.

8. Conclusion

The practical successfully demonstrated the interfacing of a 16x4 I2C LCD with an Arduino. The
Arduino was programmed to display specific text on the LCD, showcasing the ease and efficiency
of using the I2C communication protocol for LCD interfacing. The results align with the expected
outcome and validate the provided methodology.

You might also like