Can't get I2C LCD to work on ESP32-wroom
Posted: Wed Aug 21, 2024 11:48 pm
I'm embarrassed to say I can't get an I2C LCD to work on my ESP32 module.
I tired 3 different LCDs that work with UNOs, and NANOs (tested)
I tried 2 different ESP32Wroom modules, thinking the first one that I never used may be "bad"
I have tried using the LCD in the eventual program and when that didn't work, I switched to a simple I2C LCD sketch that I've used a zillion times.
I tried a NodeMCu 8266 with same results
I'm on the correct pins, P21 and P22 for SDA and SCL.
I have 5 volts on Vin of the ESP32 and 5 volts on the LCD.
I tried the simple BLINK program in my Arduino IDE and the LED on board blinks, proving I did download something. No errors in compile or download.
On power up or reset, the LCD blinks once then goes black. All 3 LCDs do this. If I pull the power wire off, then ON, the background light turns on bright (no characters), and GOES OFF if I press RESET.
I'm using displays with the I2C piggyback module (PCF8574?).
Do I need terminating resistors for I2C? I use I2C for all kinds of products but don't use resistors for the LCD. I tried turning on pullup resistors in C++ code, but don't know if this applies to the ESP32, as it does ARM CPUS.
What am I doing wrong? It's only 4 wires! Code is only 3-4 lines! Did this 1000 times in my life and it always worked.
I tired 3 different LCDs that work with UNOs, and NANOs (tested)
I tried 2 different ESP32Wroom modules, thinking the first one that I never used may be "bad"
I have tried using the LCD in the eventual program and when that didn't work, I switched to a simple I2C LCD sketch that I've used a zillion times.
I tried a NodeMCu 8266 with same results
I'm on the correct pins, P21 and P22 for SDA and SCL.
I have 5 volts on Vin of the ESP32 and 5 volts on the LCD.
I tried the simple BLINK program in my Arduino IDE and the LED on board blinks, proving I did download something. No errors in compile or download.
On power up or reset, the LCD blinks once then goes black. All 3 LCDs do this. If I pull the power wire off, then ON, the background light turns on bright (no characters), and GOES OFF if I press RESET.
I'm using displays with the I2C piggyback module (PCF8574?).
Do I need terminating resistors for I2C? I use I2C for all kinds of products but don't use resistors for the LCD. I tried turning on pullup resistors in C++ code, but don't know if this applies to the ESP32, as it does ARM CPUS.
What am I doing wrong? It's only 4 wires! Code is only 3-4 lines! Did this 1000 times in my life and it always worked.