NodeMCU Course
NodeMCU with I2C LCD
NodeMCU with I2C LCD
Eng.
Elaf
A.Saeed
• In IoT, LCD is rarely required, but some times its useful
to monitor errors and connection related issues. In this
lesson we are interfacing I2C LCD with ESP8266.
NodeMCU with I2C LCD
Eng.
Elaf
A.Saeed
• Embedded Systems should be connected with each other to transfer data
between them. Because all operations can’t be performed on a single
system.
• For example, Arduino has 6 analog pins but NodeMCU has only one
analog pin. So two are more microcontrollers or microprocessors can be
combined to form a required embedded system.
• The connection can be established through any of the following
protocols.
SPI
I2C
UART
I2C Communication Protocol
Eng.
Elaf
A.Saeed
• The I2C communication bus is very popular and broadly used by
many electronic devices because it can be easily implemented in
many electronic designs which require communication between a
master and multiple slave devices or even multiple master devices.
• The easy implementations comes with the fact that only two wires
are required for communication between up to almost 128 (112)
devices when using 7 bits addressing and up to almost 1024
(1008) devices when using 10 bits addressing.
I2C Communication Protocol
Eng.
Elaf
A.Saeed
I2C Communication Protocol
Eng.
Elaf
A.Saeed
I2C LCD
Eng.
Elaf
A.Saeed
I2C LCD
Eng.
Elaf
A.Saeed
I2C LCD
Eng.
Elaf
A.Saeed
NodeMCU with I2C LCD
Eng.
Elaf
A.Saeed
• I2C Address of LCD
NodeMCU with I2C LCD
Eng.
Elaf
A.Saeed
Step 1: Installing I2C LCD Library for ESP8266 and ESP32
• This library is tested for different types of LCD displays like
16×2, 16×4, 20×2, 20×4 with both ESP32 and ESP8266, it also
works with other ESP modules.
Step 2: Install it in Arduino IDE
• Click on Sketch >> Include Library >> Add .ZIP Library
NodeMCU with I2C LCD
Eng.
Elaf
A.Saeed
NodeMCU with I2C LCD
Eng.
Elaf
A.Saeed
• Step 3: Interface ESP8266 With I2C LCD Module
Components
Eng.
Elaf
A.Saeed
• I2C LCD Display Module PCF8574
• 16×2 LCD Display
• Connection Wires
• Single row female connector
• NodeMCU
NodeMCU with I2C LCD
Eng.
Elaf
A.Saeed
• I2C LCD Module ESP8266
• GND <——————-> GND
• VCC <——————-> Vin
• SDA <——————-> D2 (NodeMCU) GPIO 4
• SCL <——————-> D1 (NodeMCU) GPIO 5
Circuit Design
Eng.
Elaf
A.Saeed
Circuit Design
Eng.
Elaf
A.Saeed
Program Code
Eng.
Elaf
A.Saeed
• LCD
Result
Eng.
Elaf
A.Saeed
Thank you
Email: elafe1888@gmail.com
linkden: www.linkedin.com/in/elaf-a-saeed-97bbb6150
facebook: https://www.facebook.com/profile.php?id=100004305557442
github: https://github.com/ElafAhmedSaeed
youtube: https://youtube.com/channel/UCE_RiXkyqREUdLAiZcbBqSg
slideshare: https://www.slideshare.net/ElafASaeed
Slideplayer: https://slideplayer.com/search/?q=Elaf+A.Saeed
Google Scholar:
https://scholar.google.com/citations?user=VIpVZKkAAAAJ&hl=ar&gm
la=AJsN-F7PIgAjWJ44Hzb18fwPqJaaUmG0XzbLdzx09

Lesson 10- NodeMCU with LCD I2C