LCD Screen Control Part 2
Hello guys, welcome back to my blog. Today we are going to talk about the second part of the LCD screen control article. We talked about the first part of this topic in a previous article. Click the link and read it. In that article, several wires had to be used to control the LCD screen. We also had to prepare the circuit for that. Putting this into a project is a very difficult task. This required the use of six digital pins from the Arduino. Okay, today we will talk about how to do this task using four pins. That is, this LCD can be controlled by four wires. For that, we need the I2C module only.
What is an I2C module?
I2C is a communication protocol. It is called Inter-Integrated Circuit. This communication method uses an accelerometer, gyroscope, magnetometer, and RTC module and this method is also used to communicate between two Arduino boards. This I2C module has four pins. The VCC and GND pins in this sensor are used to power this module and SDA and SCL pins are using i2c communication. This SDA pin must be connected to the SDA or A4 pins on the Arduino board and the SCL pin connected to the SCL or A5 pin.
Supplies
Let’s do this in practice. The required components are as follows.
- Arduino Uno board
- LCD screen
- I2C module
- Jumper wires
Let us identify these components
.
Connect These Components As Follows
First, solder the i2c module to the LCD screen.
Look at This Code.
First, you need to include the i2c library. Click the link and download it. Include it into the Arduino IDE using the steps below.
After, we must create an object for this library. This code object name is “dis”. Then must include the i2c address and display size in the parentheses.
Next, we need to start the LCD and turn on the backlight.
After that, we need to select the print location.
Now we can print what we want. Use a double-quote for that.
Now, select the board and port. After, click the upload button.
Code
The following is another project done by the above code. This code uses three functions. You can run this code by removing the forward-slash one by one.
OK. enjoy this project. The full video guide is below. We will meet in the next post. Have a good day.