Page 1 of 1

Getting an ST7789 display to run on ESP32 Cam in Micropython

Posted: Sat Jun 24, 2023 3:50 pm
by assadollahi
I'm trying to get a display (ST7789, 320x240) to run on a ESP32 Cam in Micropython. However, I don't exactly know how to wire it. Attached you'll find how I did it, together with the code / driver from here: https://github.com/devbis/st7789py_mpy/tree/master There's a new library / driver here: https://github.com/russhughes/st7789_mpy but I wasn't able to find out how to specify the pins used. This is the display, btw: https://www.dfrobot.com/product-2071.html Any hints what to do?

Re: Getting an ST7789 display to run on ESP32 Cam in Micropython

Posted: Sun Jun 25, 2023 12:02 pm
by Agree007
What esp32 cam do you have ? Most of them dont have the free pins required for the display ?

Re: Getting an ST7789 display to run on ESP32 Cam in Micropython

Posted: Tue Jun 27, 2023 4:13 pm
by nochkin
Like mentioned before, each ESP32 module is different. Some don't even have GPIO available to wire anything to it.
The ST7789 display needs at least 3 GPIOs available (MISO, MOSI, SCLK). You can put CS low if you have SPI bus dedicated to that display only. In some cases you may drop MISO since most displays don't really need to talk back to MCU.
The display board has MISO, MOSI, SCLK and CS easy available. You may need to put SDCS high if it's not using pull-up internally, that will disable SD interface to talk on the same bus.