Using a 2.8in SPI LCD Touchscreen ILI9341 with an ESP32 on the new Arduino IDE 2

preview_player
Показать описание
Today well be interfacing the 2.8 inch SPI LCD Touchscreen with the ILI9341 chipset to an ESP32 using the new Arduino IDE 2.X Taking advantage of both display and touchscreen features, though well skip the SD card as its just an addon to the board not directly connected to these systems. I have a separate video for SD card interfacing. Out setup will not be powered through the ESP32 so I'm setting up an HW-131, a well known cheap DC power supply for this task.

HiLetgo ILI9341 2.8" SPI TFT LCD Display Touch Panel 240X320 with PCB 5V/3.3V STM32

First Ill actually be installing the new IDE version 2.0 because I dont actually have it. Though its much more streamlined than the 1.x series of Arduino IDE. It also allows for a per project board configuration which is quite an improvement over the old version. I make sure that TDT_ESPI library is installed; in my case it is, but the latest should be installed.

Following library installation, some library configurations will be made in support of out device. In particular, setup 42 will be addressed in a few files. Once these changes are made the physical wiring will be made between the two devices as demonstrated in the video. Note I did make a mistake in the wiring, it did work but wasn't ideal and caught an interesting quirk.

In the Arduino IDE I first attempt an easy example under 320x240 to ensure correct operation and wiring of the device, finding quickly a python issue on my system, easily corrected. The next attempt shows the example working correctly. Following this a touchscreen example is loaded for testing, which proves to also work correctly, completing this demonstration.

#esp32 #arduinoide #arduino
Рекомендации по теме
Комментарии
Автор

I recently bought the "UNO R3 2.8 Inches TFT Touch Screen with SD Card Socket" and one major problem was that the header files took up over 50% of the program memory. That left just less than 16k bytes, and I wanted to program up 4 or 5 simple games for it so it REALLY was not a lot of memory left. Sure it's got an sd card slot which is cool for adding sprites and stuff but there isn't a simple way around the lack of program space left over.

psyience
Автор

This video deserves a 5-star rating. I have been trying to function an ESP32 program using the Adafruit_GFX.h, Adafruit_ILI9341.h, and XP2046.h librarys with little success. (The librarys seem to be targeted for the Teensy microcontroller). The Adafruit graphicstest.ino was running at turtle-speed and I had no success for the 320x240 tft display touch function. I then used the tft_espi library to find a working touch function and an extremely fast graphicstest. Very minor modifications to my program were necessary. Very valuable information in this

billglass
Автор

Hello! I was wondering if you can help me, I followed your steps but touchscreen is not working for me I have tried using 2 different esp32 but both of them didn't work, I was thinking if it was grounded because when I touched the sd card case the touch calibration works even though I'm not touching the screen and when the touch calibration is done touch screen still doesn't work, thanks!

Klitz_j.kiel
Автор

Well done. Thanks. I use the 3.3V from the ESP32 for the power supply of the display (v1.2), and it works without any issues.

maxmuster
Автор

Hola.. te cuento, tengo la pantalla tft 2.8 y el esp32. pero no logro que funcione el touch. he realizado todo tal cual lo muestras en tu video.
1. #include
2. #define TOUCH_CS 5 // Chip select pin (T_CS) of touch screen.

tal cual quedan abilitado.
en cuanto a la pantalla si genera las imagenes correctamente. pero al incluir el programa para la KEYPAD no funcina el touch
en el monitor serie solo muestra:
13:42:44.963 -> 8�����1��V(���1�р�.
el cableado esta tal cual el video

jorgezambrano
Автор

why my screen cant full screen??? we have same component and i follow ur tutorials

konero
Автор

Hello...i like your video ... i try on a ESP32 WROOM, but e ILI9341 only able to show half screen....i try all TFT_eSPI example all display half screen... do you know how to resolved this?

siewkiawTan
Автор

good and interesting video, thank you. Is there a way in the parameters that the displayed text on the button can be centered vertically? At the moment it looks like the text is slightly vertically shifted upwards.

markuspfaff
Автор

Please assist i Have a esp32 DA Module with 38 pins and a TFT 240mmx320mm touchscreen, i followed the respective steps on your video, and my screen is just white

mpimomimo
Автор

I’m kinda stuck on a white screen. I followed every step along the way but no luck. I am using a custom pcb with a WROOM-32E

luckylazer
Автор

nice vids thanks, btw could you help me, mine was having only 3/4 of the screen 1/4 blank i dont know why, when i change the rotation from 1 to 3 it change from left to right what should i do ?

nathanneisan
Автор

the not ideal thing you say, to fix that you should have ran the LED from the power supply instead of the 3V3?

Imufur
Автор

Isn't VCC 3.3V? Supplying 5V can possibly damage circuits in the display

santhoshv
Автор

Good demonstration and explanation. You mentioned that the device uses quite a bit of power.. Do you have a value for that? Do you know how much current it draws? That would be helpful for me. I have a datasheet but it is quite lacking in electrical information. Thanks.

billfield
Автор

What if my tft display is a 3.5" 480x320? Are the steps the same? especially those in User_Select_.h files

teohjingyang
Автор

I have a blank white screen when i connect my t_clk to pin 18. The screen works with it not pluged in but then i have no touch screen any ideas?

mrblack
Автор

Great video with good help! Thanks. Can you advise how you decided with wiring of the pinout? Thanks again!

billcheung
Автор

How can I create an interface with an image matrix

alhasan
Автор

I have letters inverted vertically on such a display. I have tried many libraries, but there is no result. Advise me where to dig

Vagubando
Автор

Bingo, it worked at once, thanks again man you saved a lot of time!

sakisv