TFT LCD Screen module

General discussion about topics related to OpenMV.
OutoftheBOTS
Posts: 89
Joined: Tue May 29, 2018 4:15 am

TFT LCD Screen module

Postby OutoftheBOTS » Sat Jun 09, 2018 6:35 am

OK I seemed to have everything working well for both a little 1.77" ST7735 screen and a 2.4" ILI9341 screen.

See the demo at https://www.youtube.com/watch?v=onzi71R ... e=youtu.be

I have written hopefully a user friendly driver and it can be found at https://github.com/OutOfTheBots/OpenMV_TFT

Feel free to fork and use as you like it is MIT license

I have some nice ideas for making some little PCBs for these screens with some nice features that hopefully OpenMV designers will like and want to use and especially I hope the users of OpenMV cam will like them. Stay tuned :)
Kabron
Posts: 2
Joined: Sat May 18, 2019 6:46 am

Re: TFT LCD Screen module

Postby Kabron » Sat May 18, 2019 10:17 am

Hello,
I adjusted TFT_demo.py for ILI9341 in the following way:

Code: Select all

sensor.set_framesize(sensor.QVGA)
screen = TFT(spi, TFT.ili9341)
screen.set_window(0,0,320,240)
and got the wrong picture of double screens 160 wide and about 80 high
in upper part of the screen [ ][ ].
Correct picture occured only with 0,0,160,120 but only as part of the screen.
nickthegreek82
Posts: 2
Joined: Mon Jun 10, 2019 9:44 am

Re: TFT LCD Screen module

Postby nickthegreek82 » Mon Jun 10, 2019 9:46 am

I can confirm that the library does not work with the latest firmware version. I had the same problem. I managed to make the screen to work correctly though using the fixed firmware : download/file.php?id=536
Novice55
Posts: 1
Joined: Thu Feb 13, 2020 3:57 pm

Re: TFT LCD Screen module

Postby Novice55 » Thu Feb 13, 2020 4:26 pm

I have an Openmv H7 and I wanted to use it with a ili9341 240x320 2.8" display without the need of the IDE. The camera works fine when connected to the OpenMV IDE. Nice display good frame rate etc... But when I hook it to the 2.8" display all I get is a small strip of the video. I can see the display is active by waving my hand in front of the camera so I know it's getting the video feed. it's just restricted to a small edge of the display. I make the changes in the scripts of "Screen =TFT(spi, TFT.ili9341)" and "screen.set_window(0,0,320,240)" I have read and searched the forums and have tried several different firmware's suggested but to no avail. I've read in the forums where it has been a ongoing problem. Has the issue of the ili9341 interface been corrected for the H7? If so can someone send me in the right direction? Thanks.
OpenMV IDE Info:
Board H7, Sensor OV7725, Frimware: 3.6.0 Port COM3
User avatar
kwagyeman
Posts: 3799
Joined: Sun May 24, 2015 2:10 pm

Re: TFT LCD Screen module

Postby kwagyeman » Thu Feb 13, 2020 5:20 pm

I don't believe we support that display. Another user wrote a library for it however if you search the forums for that display.
Nyamekye,
User avatar
CRMANN
Posts: 1
Joined: Wed Feb 19, 2020 6:06 pm

Re: TFT LCD Screen module

Postby CRMANN » Fri Mar 13, 2020 12:22 pm

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!):

--> https://github.com/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:

Code: Select all

#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.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
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
screen.set_window(0,0,320,240)


while(True):
    clock.tick()
    img = sensor.snapshot()

    # some image processing code goes here...

    screen.write_to_screen(img) #send the fb to the screen
    print(clock.fps())
Key points: Note DC==9 per the comments. Also BACKLIGHT (LED) & RESET are connected to 3.3v.
Last edited by CRMANN on Sat Mar 14, 2020 7:59 pm, edited 2 times in total.
User avatar
kwagyeman
Posts: 3799
Joined: Sun May 24, 2015 2:10 pm

Re: TFT LCD Screen module

Postby kwagyeman » Fri Mar 13, 2020 12:56 pm

Thanks for the library!
Nyamekye,

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests