TFT LCD Screen module

You are correct, there have been changes made that affect how someone writes to an LCD. The new display.SPIDisplay() function should be used to setup a custom LCD. I recently had to make those changes and successfully used it with my ST7789 based display.

The most important point is to now import the display module instead of “lcd”:

import sensor, image, time, display

…and then update the relevant setup code so that the display module is correctly configured, for example:

myLCD=display.SPIDisplay(width=240,height=240,refresh=60,bgr=False,byte_swap=False,triple_buffer=False)

I also had to update the function to write the image to the display:

myLCD.write(img)

I believe those are the most important changes when migrating to the “new way” of interfacing a SPI LCD display.

FYI: There is more detail about my work to implement a custom driver in this thread that I created - however please be aware this references the old “lcd” module…otherwise the content is very useful:

Can no longer drive ST7789V SPI TFT w/ firmware 3.8.0 (works for <= 3.6.7) - OpenMV Products - OpenMV Forums