due to the demand of some customers, I would like to briefly show our LCD display with I2C adapters on an ESP32 Dev board.
Unlike most Arduinos, the ESP32-Dev-Kit-C not only the possibility to operate a single I2C bus, in our example, we use the pins G21 and G22 today.
When the FC-113 adapters are plugged in, the wiring is very simple to implement on the LCD with only 4 connections. A pencil and socket strip between the LCD and the I2C adapter has proven to be very practical more often than ever.
The necessary steps briefly summarised:
- Installing ArduinoIDE with board definitions from Espressif
- Download the Library from above link
- Sketch-> Include Library-> Add a .zip Library and select Library
- Restart IDE
- Select File-> Examples-> from your own libraries-> NewLiquidCrystal_lib-> Hello World i2c, we see:
We replaced this part by:
#include <Wire.h> #include <LiquidCrystal_I2C.h> #define BACKLIGHT_PIN 13 LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7,3,POSITIVE); // Set the LCD I2C address // LiquidCrystal_I2C lcd (0x38, BACKLIGHT_PIN, POSITIVE); // Set the LCD I2C address
And can then use the LCD on ESP32 without having to rewrite source code without already existing Arduino.
A lot of fun and experimentation,
up to the next post:)