Page 1 of 1

16X2 LCD screen

Posted: Tue Oct 09, 2018 3:49 pm
by guyd
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

Re: 16X2 LCD screen

Posted: Wed Oct 10, 2018 6:57 am
by pythoncoder
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.

Re: 16X2 LCD screen

Posted: Wed Oct 10, 2018 7:33 am
by guyd
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.

Re: 16X2 LCD screen

Posted: Wed Oct 10, 2018 9:55 am
by adxx
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).