FYI: Using latest OpenMV IDE and an H7 w/ latest firmware…
I have successfully integrated the Adafruit 2.2" ILI9340C TFT module into my project, using the following TFT driver (referenced in this thread - thanks OutOfTheBots!):
→ GitHub - OutOfTheBots/OpenMV_TFT
First, copy the file “OpenMV_TFT.py” to the USB flash storage of the H7. Then, run the (slightly modified) code below:
#TFT screen demo to steam frame buffer to a external SPI screen
import sensor, image, time
from machine import SPI
from OpenMV_TFT import TFT
sensor.skip_frames(time = 2000)
clock = time.clock()
spi = SPI(2, baudrate=54000000) #create an SPI bus
#create an instance of the screen driver
#you mustr pass a SPI bus and type of screen (ili9341 or st7735
#optional can pass cs pin and dc pin default is cs='P3' and dc='P9'
screen = TFT(spi, TFT.ili9341)
#set window on screen to write to (x_start, Y_start, width, height)
#the window needs to be inside the resolution of the screen and must match the exact size of fb
img = sensor.snapshot()
# some image processing code goes here...
screen.write_to_screen(img) #send the fb to the screen
Key points: Note DC==9 per the comments. Also BACKLIGHT (LED) & RESET are connected to 3.3v.