I'm trying to use an ESP32-S.
I have connected an LCD via pins 21 and 22 (plus power).
The program compiles but the display never changes.
I have run an i2c finder progrma and that comes back with the default 0x27 for my LCD with i2c back pac.
Arduino IDE 2.3.2
/*
* For more detail (instruction and wiring diagram), visit https://esp32io.com/tutorials/esp32-lcd-20x4
*/
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4); // I2C address 0x27, 20 column and 4 rows
void setup() {
lcd.init(); // initialize the lcd
lcd.backlight();
lcd.setCursor(0, 0); // move cursor the first row
lcd.print("LCD 20x4"); // print message at the first row
lcd.setCursor(0, 1); // move cursor to the second row
lcd.print("I2C Address: 0x27"); // print message at the second row
lcd.setCursor(0, 2); // move cursor to the third row
lcd.print("DIYables"); // print message at the third row
lcd.setCursor(0, 3); // move cursor to the fourth row
lcd.print("www.diyables.io"); // print message the fourth row
}
void loop() {
}
ESP32+i2c+LCD
Re: ESP32+i2c+LCD
Run an I2C scanner sketch on your ESP32 to confirm that it detects the LCD at address 0x27. If it doesn't detect the device, there might be a wiring or communication issue.
Who is online
Users browsing this forum: No registered users and 131 guests