Freitag, 27. Juli 2018

LCD 1602 I2C connected to ESP8266

In this post I will show you a quick tutorial how to use lcd 1602 with ESP8266 via I2C connection.

Illustration 1: LCD 1602 connected via I2C to ESP8266

Setup Arduino IDE 

First we need to install LiquidCrystal-I2C-library.


  1. Download lib as .zip from link above
  2. Install it (without unzipping) manually.
    1. Sketch -> Include Library -> Add .zip Library -> select downloaded LiquidCrystal lib
Illustration 2: Arduino IDE Menu


Wiring

In this example I used a module marked with "MH". For this module the hardware address for lcd is 0x3F. If you have an other module you have to google it.

We use SPI connection to save up some wires.

Now let do the wiring schematic:
Connect the module like the picture below to your display. For detailed wiring information have a look to the pin connection in code comments below. Optional the module is soldered to your lcd so you can continue to wiring to ESP8266.

Illustration 3: I2C Module




Code



Keine Kommentare:

Kommentar veröffentlichen

Post Top Ad

Your Ad Spot