Arduino TFT LCD Touch Screen Tutorial (2.8' ILI9341 Driver) also for ESP32

preview_player
Показать описание
Welcome to another Arduino video tutorial! In this video, we are going to take a first look at this 2.8" Color TFT Touch display!

Today we are going to learn how to drive the 2.8" Touch display with the ILI9341 driver with an Arduino Uno and an ESP32 board. First of all, let's take a close look at the display itself. The display is big, and it offers a resolution of 320x240 pixels. Compared to one of my favorites displays, the 1.8" Color TFT display you can see it a lot larger. The screen also offers touch functionality which is an added bonus and an SD card slot at the back. It uses the SPI interface, so the connection with the Arduino is very straightforward. The cost of the display is relatively low; it costs around 11$ which in my opinion is a fair price for what this display offers.

--------------------
LIBRARIES
--------------------

--------------------
CODE OF THE PROJECT
--------------------

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

I hope you took away lots from this video. Let me know below!
PS: I'm creating an OOP course! Sign up at for early access and a 50% launch discount.

Educs
Автор

Anyone who may be stuck... I got my 2.8" SPI TFT working on an NodeMCU 32S "ESP32-WROOM" board in hardware SPI mode. There are various pinout versions that look similar, so you have to find the right one. I found that the diagram with VSPI pins worked for mine, connecting pins VSPI_MOSI, VSPI_SCK, VSPI_SS up the video board, which were labeled P23, P18 and P5. There is a VSPI_CS so I just used that for SS, and DC went over to "P2". Reset is on P0 but idk, there is no apparent magic location for the tft constructor, or if reset is necessary unless maybe after an imposed sleep mode. The pin numbering was confusing for my first time using this board. P2 means 2 in code. The global variable declaration is then:
*tft* = Adafruit_ILI9341(5, 2);

And omfg it is so fast compared to software mode, especially software mode on an Uno or Mega.

officermeowmeowfuzzyface
Автор

How about making a retro games console with the esp32 and the display? There's an open source NES emulator for the esp32 and other systems are being worked on e.g. ZX Spectrum

jamieh
Автор

As of writing this i am having an issue. My LCD is still white. Not that the lcd is bad, its a well reviewed lcd, a Hiletgo tft spi v1.2. But yet nothing is working. I really would appreciate some help here

elgentidwell
Автор

Were you able to get the touch functionality to work with ESP32? I really need that.. wondering if you got it to work? Thank you for your awesome content!

dragonbot
Автор

Hey...I just wired my display up exactly like the one in the video and ran the demo graphics test in arduino lde, but all I have is a white screen!

acatisfinetoo
Автор

This display works with Arduino Uno not only so slow, but is need to use hardware SPI, not software.

Start procedure in Code:
#define TFT_DC 9
#define TFT_CS 10
#define TFT_RST 8
//#define TFT_MISO 12 - defined automatically in the library + this pin ist not used
//#define TFT_MOSI 11 - defined automatically in the library
//#define TFT_CLK 13 - defined automatically in the library

Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST); // only this pins defined in Start, else is working software SPI !

And the speed is almost the same as at ESP32. But otherwise an excellent tutorial, and not just this one, but all.

danielgago-sk
Автор

Nick, I hope you're successful getting this touch display to work with an ESP32. I've got it working as a display or for touch input, but haven't been able to get touch input working while displaying data on the screen. It appears that the display and touch libraries don't work at the same time on the ESP32, even after configuring different D/C and CS connections. I see that someone has done this using the Espressif IDE, but I haven't found anyone doing this in the Arduino environment.

andrewkieran
Автор

A great video. but the page for coding is not working. Thank you.

mecatx
Автор

Best Arduino channel on YouTube I've found

sangitasrivastava
Автор

Thanks this works, I tried other ways from other youtube videos voltage dividers and logic level shifters but those didn't work, but this was the only schematic that actually works and uses far fewer resistors.

rickrose
Автор

Does the sketch 'ILI9341_RTC' work with ESP32?
What is the configuration of the pins?
Thanks

Dancopymus
Автор

Thanks for this nice video! I have currently this TFT LCD display on my desk and I'll use a teensy LC which is 4x faster than arduino and 3.3V to see the result

racingmat
Автор

HELP I'm work on my project right now, which use this I have problem with white I'm using arduino mega 2560

moji
Автор

On such a display, the image on the screen is inverted horizontally by 180 degrees (that is, the entire display screen) on ESP8266. I have tried many libraries, but there is no result. Advise me where to

Vagubando
Автор

So disappointed! Fucking library ILI9341 does not work, program says "compiled error"

Dunkel_Neon_Blood
Автор

Is there a reason you choose to use this slower "software SPI" library function instead of the much faster hardware SPI features that is possible from this same Adafruit library? Thanks.

BGLENN-dptx
Автор

My tft spi 240*320 display lit up in white, even after putting the code it still remained white, this is not the first time I got it white I did the same project with another vedio but it didn, t work. It would be a great help if anyone know how to fix this problem😓😓but anyway it is a good project😉😇😃

shanuka
Автор

Greetings
I have a TFT LCD Touch Screen 3.2" SPI ILI9341 but, I can't calibrate the Touch Screen with the URTouch library. It arrives at the INSTRUCTIONS screen and, when I click with the pen, the screen doesn't continue.
The TFT Display normally works with the UTFT library. I configure the pins on the Arduino Mega as follows:
UTFT myGLCD (ILI9341_S5P, 51, 52, 10, 9, 8); // UTFT myGLCD (Model, SDI, SCK, CS, RST, DC);
URTouch myTouch (6, 5, 4, 3, 2); // T_CLK, T_CS, T_DIN, T_DO, T_IRQ
With all the pins connected via a CD4050BE.

Would you have any tips, please? Thank you

Dancopymus
Автор

Using the touch screen for ESP32 requires the tft_espi library

billglass