Hello everyone, In this article, we will get to know and use the I2C and the 16x2 LCD. Let’s get started!

Read This!

If you want to learn more about the 16x2 LCD Screen in more detail and how to use it without I2C, you can find out by clicking here. This blog will also be supported with guide blogs. ✨

What is an I2C Adapter?

The I2C chip has an 8-Bit I/O Extender chip–PCF8574. This chip converts the I2C data from an Arduino into parallel data required by the LCD screen.

If you don't see the image, please let know in the comments!

The I2C also has a small trim pot to fine-tune the display’s contrast. You can adjust its brightness by turning it with a screwdriver.

If you don't see the image, please let know in the comments!

In addition, the I2C has a pin cable that supplies power to the backlight. To control the intensity of the backlight, you can remove the cable and apply an external voltage to the head pin marked “LED”.

Without going into more detail, let’s move on to the way it is linked.

I2C Connection

If you don't see the image, please let know in the comments!

Arduino IDE Library Setup

If you don’t know how to set up a library, you can check out this page.

Download the LiquidCrystal I2C library by Frank de Brabander by typing liquidcrystal instead of searching for a library. If you can’t find it, quickly download it from this link (it downloads as soon as you click it) and add it as a ZIP. (Downloading from Arduino site.) Here’s a quick rundown on how to add it as a ZIP.

Coding

#include <LiquidCrystal_I2C.h> // added the library

LiquidCrystal_I2C lcd(0x3F,16,2);  // for a screen of 16 characters and 2 lines, the LCD address is set to 0x3F.

void setup() {
  lcd.init();
  lcd.clear();
  lcd.backlight();      // backlight on
  lcd.setCursor(2,0);   // 3 rows to the right, 1 column down
  lcd.print("projedefteri.com");
}

void loop() {
}

If you have had any problems, do not forget to check your links, or you can send your questions, comments, and suggestions from the comments! Happy coding! 😁