Hi,
I'm using a 16X2 LCD matrix using I2C- for a project using RPI_ZERO_W.
I'm looking for a equivalent lib in microPython for ESP32/ ESP8266.
Guy
16X2 LCD screen
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: 16X2 LCD screen
Assuming it uses a Hitachi HD44780 chip there are various MicroPython drivers. These from Dave Hylands cover a wide variety of types.
I wrote a uasyncio-based asynchronous driver here, but it only supports parallel connection over a 4-bit interface.
I wrote a uasyncio-based asynchronous driver here, but it only supports parallel connection over a 4-bit interface.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: 16X2 LCD screen
Hi Peter,
I used Dave's lib, but I don't understand which are the i2c pins to connect to, and what to do when port supplies 3.3v rather than 5v.
I used Dave's lib, but I don't understand which are the i2c pins to connect to, and what to do when port supplies 3.3v rather than 5v.
Re: 16X2 LCD screen
AFAIK, default pins for I2C are:
GPIO 4 is SDA
GPIO 5 is SCL
Also, these can be changed to any other pin, because I2C is software driven.
To match 5V on display with 3.3V on GPIO you can use level shifters (different types are available).
GPIO 4 is SDA
GPIO 5 is SCL
Also, these can be changed to any other pin, because I2C is software driven.
To match 5V on display with 3.3V on GPIO you can use level shifters (different types are available).