Help setting up TFT_eSPI & LGVL

TRNPep

Member
Hi everyone, i am currently working with a TFT display with a ILI9341 driver, using a T4.1 and I already made the display working using the ILI9341_T3 library. I am triyng to set up the LGVL library following the steps on https://docs.lvgl.io/master/get-started/platforms/arduino.html#configure-lvgl .

Since it reccomends using the TFT_eSPI library, I downloaded it and started its configuration accordingly. By looking at the configuration file named User_setup.h, nothing point me to the direction of teensy. So basically I have no idea how to configure the library! if you have already tested it, would you please be so kind to help me out?

This seems to be my only problem since the configuration of LGVL seems pretty easy and board-independent.
I already made the display working using the ILI9341_T3 library.

Pin configuration (SPI0 on T4.1):

teensy TFT
------|------|
MISO 12
MOSI 11
CLK 13
CS 9
DC 10
RST 14

Thank you!
 
Hey there

Try using this settings:


MISO 12 <- maby not needed, but correct
MOSI 11 <- correct
CLK 13 <- is this TFT_SCK? Then its correct
CS 9 <- your pinOut for the TFT
DC 10 <- change to 9
RST 14 <- change to 8

This should do it

Cheers
 
It worked! But it was not just a matter of the pin configuration. I actually had to modify a few lines in User_setup.h

Code:
// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP   ######

// For ESP32 Dev board (only tested with ILI9341 display)
// The hardware SPI can be mapped to any pins

#define TFT_MISO 12
#define TFT_MOSI 11
#define TFT_SCLK 13
#define TFT_CS   10  // Chip select control pin
#define TFT_DC    9  // Data Command control pin
#define TFT_RST   8  // Reset pin (could connect to RST pin)
//#define TFT_RST  -1  // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST

This way it will work perfectly. Thanks tho, have a nice day.
 
Back
Top