Need Code for ESP32 to 4004 Character LCD Module with I2C Interface

"Need Code" sound selfish and like "can somebody write the complete code for me"

The Arduino-Forum has a search-function
The search-function found this thread

I2C is I2C .
And the PCF8574 is the most common used chip for these adapters

Here is a WOKWI-Simulation that uses an ESP32 and a 20x4 Display.
This display works with the standard-"Arduino"-libraries.

The advantage of this modular-concept of libraries is that
higher-protocol-levels of any kind can be used with different microcontrollers.

If you lookup the library-files where the lib-files are stored and there is no special version for your microcontroller then it will work with your microcontroller.

example for a special library that is stored in the hardware-package
....packages\arduino\ hardware\esp32 \2.0.17\tools\sdk\esp32s3\include\esp_wifi\include\esp_wifi.h

user @noiasca

has written a library that can be used for 40x4-LCds
This library offers even language-specific characters

I successfully compiled the example-code for an ESP32
which is this one
....sketchbook\libraries\NoiascaLiquidCrystal\examples\02_I2C_PCF8574\0209_I2C_4004

You can download the library from here
https://werner.rothschopf.net/microcontroller/202012_arduino_liquid_crystal_language_en.htm

The manufacturers website

says
SLC4004B is 40 characters wide, 4 rows character lcd module, AIP31066 controller (Industry-standard HD44780 compatible controller), 6800 4/8-bit parallel interface,

controller is HD44780-compatibel
I2C-chip is most common
conclusion: should work

1 Like