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

  Рет қаралды 244,422

educ8s.tv

educ8s.tv

6 жыл бұрын

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.
🛒 Display: educ8s.tv/part/28ILI9341
--------------------
LIBRARIES
--------------------
📥 Adafruit GFX: github.com/adafruit/Adafruit-...
📥 Adafruit ILI9341: github.com/adafruit/Adafruit_...
📥 URtouch: www.rinkydinkelectronics.com/l...
--------------------
CODE OF THE PROJECT
--------------------
📥 educ8s.tv/arduino-2-8-ili9341-...
👨‍💻 Check my new KZfaq channel: bit.ly/3tku2n0
🎮 My Android Game: bit.ly/QuizOfKnowledge

Пікірлер: 207
@Educ8s
@Educ8s 2 жыл бұрын
I hope you took away lots from this video. Let me know below! PS: I'm creating an OOP course! Sign up at programmingwithnick.com/course for early access and a 50% launch discount.
@AllanDee
@AllanDee 2 жыл бұрын
Thanks so much for putting this together. I just received my TFT in the mail and will be using it for a weather station project. I really appreciate your intro and sample code. This will be a great place to start.
@rickrose2235
@rickrose2235 4 жыл бұрын
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.
@wduraes
@wduraes 6 жыл бұрын
Awesome tutorial. I love how much I learn about devices I can use on my projects by watching your channel!!
@racingmat13
@racingmat13 5 жыл бұрын
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
@officermeowmeowfuzzyface4408
@officermeowmeowfuzzyface4408 5 жыл бұрын
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.
@liveriesfsx9352
@liveriesfsx9352 4 жыл бұрын
Another great video for beginners. Easy to understand, a lot of useful informations. Thank You!
@sangitasrivastava172
@sangitasrivastava172 6 жыл бұрын
Best Arduino channel on KZfaq I've found
@peterwackel7995
@peterwackel7995 3 жыл бұрын
It seems to be the first one you found...
@shadyengineer1988
@shadyengineer1988 6 жыл бұрын
Hi. Thanks for sharing. I'd like to say that there are two possible reasons for slow display: the first one is using software SPI instead of hardware SPI and the second reason is using UCGlib instead of Adafruit graphics library + adafruit ILI9341 library (the Adafruit library has excellent performance).
@larrybud
@larrybud 7 ай бұрын
How do you force it to use the hardware spi?
@NavyPanther54
@NavyPanther54 2 жыл бұрын
This video is what made me buy some esp32. Making a screen for my car and I need it to update faster, and the Arduino is noticeablely slow to update
@leehewitt9559
@leehewitt9559 6 жыл бұрын
Fantastic Nick, great video very useful. Many thanks for this information.
@sabrinaflipse7732
@sabrinaflipse7732 5 жыл бұрын
can you explain what to do with the pins on the right? do they power the SD card? i have a microyum TFT but i want to make photo display and call my images up but i can't access my SD card and dont know what to do with those pins. thank u
@billglass5160
@billglass5160 2 жыл бұрын
Thank you for the tutorial. It is very thorough and well-supported with good documentation. I will try this display. I ordered one today. I am thinking about replacing my current LCD 16x2 display on my sensor host station. I am currently using a Nano, but I have a spare Teensy 4.0 in my workshop. I will probably use it to meet the required additional memory and speed requirements fot this display. I compiled your 3 example codes for the Teensy. The graphics code compiles OK but I had some warnings for the RTC code and errors for the touch code. I will wait for delivery of my display before looking into these details and let you know.
@billglass5160
@billglass5160 2 жыл бұрын
Compatability problem. Need to replace #include "URTouch.h" by #include for the Teensy. I got it working OK. Much better display compared to the LCD 16x2. Also, I have all my sensor data on one single screen page instead of 2.
@Dancopymus
@Dancopymus 4 жыл бұрын
Does the sketch 'ILI9341_RTC' work with ESP32? What is the configuration of the pins? Thanks
@surflaweb
@surflaweb 11 ай бұрын
Hi dear, I would like to kwno what library did you used? I tested TFT_eSPI however doesnt work. thanks
@masonjodood554
@masonjodood554 Ай бұрын
Just a tip if you didn’t know or are new to high definition tft displays: Instead of clearing the screen for each loop or each time something is updated, just paint over it using a black rectangle and then print the new data. It is basically partial refresh and will DRASTICALLY improve performance.
@kosa2004
@kosa2004 6 жыл бұрын
I am using the ILI9341 Displays with ESP8266 projects. For example i am in love with Squix weather station and modding it to fit my needs. Take a peek on it :)
@shinevisionsv
@shinevisionsv 6 жыл бұрын
Awesome video as always!!
@alnoorratansi9364
@alnoorratansi9364 5 жыл бұрын
Great Project , we could improve it by getting time from the internet and setting the rtc. once every 12 hours to keep the rtc accurate.
@komal1090
@komal1090 5 жыл бұрын
Can you please help me on clear screen when the user click on clear button.I am using 2.4'' TFT LCD shield.
@gaelimont9821
@gaelimont9821 6 жыл бұрын
Hello, I have an Adafruit LCD 2.8" TFT Touch Shield for Arduino and with your libraries I can display the different code, especially the Touch Demo, but the touch doesn't work. Can you help me please
@PerchEagle
@PerchEagle 5 жыл бұрын
So the resistors are in series? I thought you need voltage driver circuit which has 2 resistors and you take the voltage from the center.
@jokoo111111
@jokoo111111 Жыл бұрын
I have been using this display for two years for my project. I have a problem in summer time when it heats up from the sun above 50 degrees celsius. The display turns white and nothing can be seen. When it cools down in the shade it works again. Could you please advise me what I can do in this case. Have you had this problem?Thank you in advance.
@barot67
@barot67 Жыл бұрын
hello...what type of esp 32 did you use?...thank you
@sampri22
@sampri22 3 жыл бұрын
why don't you like the Nextion display? could you please elaborate on that?
@SgtWilliamPepper
@SgtWilliamPepper 5 жыл бұрын
Is it possible to make this display into a vga monitor?
@benjaanimations5219
@benjaanimations5219 2 ай бұрын
how do i connect the red wires together in the schematic
@electron-1979
@electron-1979 6 жыл бұрын
Please explain why you don't like the Nextion displays
@IgorSwxy
@IgorSwxy 4 жыл бұрын
What about power consumption? Using this screen with battery is a good idea?
@ghost-tfue0976
@ghost-tfue0976 Жыл бұрын
I didn't understand if the esp 32 supports touch functionality with this display. Please help me, I'm going to buy a starter kit, an esp 32 and this display but I'm really unsecure and scared to buy the wrong and not compatible things
@freytube1
@freytube1 5 жыл бұрын
great video do you have a tutorial for a Simple GUI with this TFT and ili9341 driver ?
@harveyxing2329
@harveyxing2329 2 жыл бұрын
Hey, my tft lcd is wired up like yours, but displays a blank screen. The serial port prints the events as usual, but the display stays white. It works on a esp8266, but not a arduino uno/mega.
@Exo5432
@Exo5432 6 жыл бұрын
My screen works only if I run without ts.initialize(). If I try to use the touch with the ts, the whole screen goes white and does nothing.
@maulanawahyudi7127
@maulanawahyudi7127 Жыл бұрын
when I use STM32F103C8 with the library, there is a message " Error compiling for board Generic STM32F1 series." , what should I do, sir?
@fabiorube7764
@fabiorube7764 Жыл бұрын
As reported in the manual Make a bridge in J1 for use the dispay at 5V instead 3,3 v with resistors installation
@apriladrian2771
@apriladrian2771 Жыл бұрын
sir, can i see a bit of your code with esp32 as a board that display to ILI9341 . i try it with my code can work but the display pile up when the data of the sensor change. thanks before
@sabrinaflipse7732
@sabrinaflipse7732 5 жыл бұрын
how do u make the sd card work
@analogorgler3048
@analogorgler3048 5 жыл бұрын
Hi, nice tutorial. I got the same display and it is working nicely with the Graphic test program. Unfortunately the tou´ch I do net get to work. How you managed to get the touch program working. I have reviewed the libaries but could not find the problem.
@mmaranta785
@mmaranta785 2 жыл бұрын
How to get landscape fonts? As opposed to portrait mode
@LuisSanzSantoni-yf8sf
@LuisSanzSantoni-yf8sf 3 ай бұрын
Thanks for your video. Have you got any example with raspberry pi pico?
@Vagubando
@Vagubando Жыл бұрын
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 dig?????
@mexicanfirefighter
@mexicanfirefighter 4 күн бұрын
do the 10k resistors also work with a 4" TFT?
@tommyd5758
@tommyd5758 6 жыл бұрын
Great tutorials , keep up the good work )
@Educ8s
@Educ8s 6 жыл бұрын
Thank you, Tommy! I am glad you liked it!
@mukhritdinegamberdiev8469
@mukhritdinegamberdiev8469 6 жыл бұрын
Could you pls make a sefie stick which can track you automatically and take a pictures as you say “shoot”
@raffaelebarlotti9017
@raffaelebarlotti9017 Жыл бұрын
Hi, very interesting! I can't set the exact date and time, can you help me do it? Thank you.
@jamieh9351
@jamieh9351 6 жыл бұрын
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 etc.....
@PP-yg6ll
@PP-yg6ll 4 жыл бұрын
How to display sensor value on this screen (example A0)? On 1.8” display it’s easy with “TFTDisplayText” examples.
@Dancopymus
@Dancopymus 4 жыл бұрын
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
@goosegoose3359
@goosegoose3359 4 жыл бұрын
Very good . You really helped me get my screen to work. Can you please advise how to calibrate this screen please?
@jeffflowers5489
@jeffflowers5489 3 жыл бұрын
Your pins in the diagram for the ESP32 show D15, D18, D19 and D23 but mine has D1 ~ D8.
@MeenaSingh-vd5ur
@MeenaSingh-vd5ur 5 жыл бұрын
A interface Display as given in Video but it's not working only white screen is there.
@ahmedmansour1479
@ahmedmansour1479 2 жыл бұрын
how i read and write to sd 3.5"tft arduino mega sheild 2560
@diyaaldeen1097
@diyaaldeen1097 Жыл бұрын
Can you make a tutorial on the 4.0/3.95 inch ST7796S SPI TFT.
@alexle3598
@alexle3598 6 жыл бұрын
good day Sir! can you please make sketch simple menu control with 3 or 4 buttons for this display, thanks just trying to adapt your code from nokia 5110 display.. its working but blinking...
@duncanduncan3064
@duncanduncan3064 4 жыл бұрын
How to use SPI hardware on this screen ?
@chithraniathapaththu5655
@chithraniathapaththu5655 10 ай бұрын
I want to use sd card reader in the display and display image
@namocrafts1101
@namocrafts1101 6 жыл бұрын
Thank u for the project I used the tft display to make the finger print for my garage opener I used ur example for the fingerprint and I made it thank u
@namocrafts1101
@namocrafts1101 6 жыл бұрын
kzfaq.info/get/bejne/ntRiZtaCrcqsgIE.html
@Educ8s
@Educ8s 6 жыл бұрын
Very cool! Thanks for sharing!
@orky2912
@orky2912 5 жыл бұрын
Hi, sorry but I couldn't make it work because when I check the code, arduino said me "Adafruit_SPITFT.h: No such file or directory #include " and this library I can't found it. Do you have any solution to this problem?? Tks
@AntonioSantana
@AntonioSantana 4 жыл бұрын
Ineed to find a sketch to display a logo. I am using the esp32 pico. It can be Bitmap.
@FernandoMoreiraR
@FernandoMoreiraR Жыл бұрын
I have been trying to get my ILI9341 to work and failed multiple times, after 7 failed configurations, I had luck with yours! The only thing, which I dont get is that on my ESP32 setup I attached the LED pin not to the 3.3V but to pin 5 on my EPS32, and it works like a charm. But I dont know WHY it works, you got any insights? Once again thank you, I can finally move pass to the 2nd stage of my little project.
@user-ke7vq7ts9f
@user-ke7vq7ts9f 5 жыл бұрын
How to use in arduino mega pin 22-29 in your code? Please
@SuperJamesMA
@SuperJamesMA 6 жыл бұрын
Thanks for sharing. The adafruit library supporting ESP32's hardware SPI, do not pass TFT_MOSI & TFT_CLK in the constructor: Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST); It could be much faster. BTW, how's your testing on the touch input?
@fairpoor
@fairpoor 4 жыл бұрын
Very good comparison. So informative. :D
@safwanshaib9106
@safwanshaib9106 Жыл бұрын
In the diagram at minute 2:31, you connected the Vin and LED pins of the display to the 5V instead of the 3.3V on the arduino
@moji5867
@moji5867 2 жыл бұрын
it will work on mega 2560 ??
@alexlux147
@alexlux147 6 жыл бұрын
Could you test it with an Arduino 2 ?
@TheKungFuMiMa
@TheKungFuMiMa 6 жыл бұрын
i have a problem with Arduinographicstest - my display stay white
@konstantinosdamaskos4138
@konstantinosdamaskos4138 3 жыл бұрын
Hello, the tft freezes after some hours. What can i do? I think i must be a stability issue. How i can reduse the noise on spi pins? Thanks in responce and congrats for tha amazing channel.
@haajee1
@haajee1 5 жыл бұрын
i don't know what voltage shifting is and how to use it. But i connected directly to the arduino but get only a white screen. Why does everyone give not complete step by step tutorials... i think the display is now blow up?
@rezwanachowdhury8789
@rezwanachowdhury8789 5 жыл бұрын
the date and time is wrong on mine, hope someone can help
@ivsrdt
@ivsrdt 3 жыл бұрын
Thanks, I did this project successfully
@TheDIYer
@TheDIYer 2 жыл бұрын
I used 5v now what happens?
@shadyengineer1988
@shadyengineer1988 6 жыл бұрын
Consider voltage shifting circuit instead of using current limiting resistors.
@neutron7
@neutron7 Жыл бұрын
You red looks a lot better than mine, It's sort of orange. is there some sort gamma setting for it?
@BGLENN-dp4tx
@BGLENN-dp4tx 5 жыл бұрын
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.
@dryan8377
@dryan8377 3 жыл бұрын
because you can't use the flash ram card in that mode
@user-le4bn6pf2p
@user-le4bn6pf2p 6 жыл бұрын
can you help me to make a mars rover
@domeniconuzzi5684
@domeniconuzzi5684 4 жыл бұрын
Great tutorial, thank you. Could you test it with an Arduino Yun?
@chithraniathapaththu5655
@chithraniathapaththu5655 11 ай бұрын
Can't we display image?
@melmarshall8176
@melmarshall8176 4 жыл бұрын
I would like to see a project for an Artificial Horizon using GY-9250 9-Axis Accelerometer, Gyro & Magnetometer MPU-9250
@moji5867
@moji5867 2 жыл бұрын
HELP MEEEE..... I'm work on my project right now, which use this LCD...... I have problem with white screen..... I'm using arduino mega 2560
@liliansananikone3588
@liliansananikone3588 2 жыл бұрын
Hi ! It is possible to load and display an image for example, a jpeg on the screen ? Thanks for answer !!!
@Educ8s
@Educ8s 2 жыл бұрын
Yes you can!
@avejst
@avejst 6 жыл бұрын
Thanks for sharing :-)
@elgentidwell9407
@elgentidwell9407 3 жыл бұрын
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
@raphaw7684
@raphaw7684 2 жыл бұрын
Was ist possible to solve the problem? I have the same problems!
@arysetiawan7309
@arysetiawan7309 4 жыл бұрын
waiting for touch screen wiring
@michaelschroder7186
@michaelschroder7186 4 жыл бұрын
great tutorial In the meantime, have you found a working touch library for the ESP32 card? I want to use the SPI-ILI9143 display in conjunction with an ESP32 board. However, I need the touch function
@nikoskalousis3523
@nikoskalousis3523 3 жыл бұрын
Hello. TFT_eSPI library works great with ESP8266 and ESP32. Give it a try.
@kokololokokololo1
@kokololokokololo1 6 жыл бұрын
what is the name of the risestors box and where i can buy it, it is very nice for keeping them in order and reduce the mess
@andreandrade1997
@andreandrade1997 6 жыл бұрын
They were 3D printed, you can find the files here: www.thingiverse.com/thing:1617965
@ianvangiesen2523
@ianvangiesen2523 6 жыл бұрын
Great tutorial. Effective communication within the arduino community is hard to find. Does anybody know of a tutorial like this for the ILI9225? I've been struggling for many hours and could use a couple of pointers. -Thanks
@38911bytefree
@38911bytefree 6 жыл бұрын
GOOD VIDEO !!. THANKS
@mirosarte7746
@mirosarte7746 6 ай бұрын
why the text is reversed in my lcd?
@hsmptg
@hsmptg 4 жыл бұрын
Hi The touch feature in these LCDs only work with the pencil or I can use my fingers aswell? Thanks and keep the good work!
@danielgago-sk
@danielgago-sk 4 жыл бұрын
Is working with finger too.
@danielpaz349
@danielpaz349 5 жыл бұрын
nice man. what about SD? good job
@aamir99204
@aamir99204 5 жыл бұрын
educ8s.tv how to connect to stm32
@danielgago-sk
@danielgago-sk 4 жыл бұрын
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.
@MarkG0MGX
@MarkG0MGX 4 жыл бұрын
Have you got the touch working on ESP32 yet?
@acatisfinetoo3018
@acatisfinetoo3018 3 жыл бұрын
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!
@MichaelRemolif
@MichaelRemolif 3 жыл бұрын
Have you overcome the problem? I have the same one...
@billglass5160
@billglass5160 Ай бұрын
Using the touch screen for ESP32 requires the tft_espi library
@dragonbot2038
@dragonbot2038 5 жыл бұрын
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!
@julianosantos4887
@julianosantos4887 4 жыл бұрын
I'm waiting for
@RenanCandidoVieira
@RenanCandidoVieira 5 жыл бұрын
what's the software to use for making SCHEMATIC DIAGRAM ?
@snoeg
@snoeg 5 жыл бұрын
Fritzing. It's in the picture. Low left corner.
@markopalikko6986
@markopalikko6986 6 жыл бұрын
Good video, thank you!
@Educ8s
@Educ8s 6 жыл бұрын
Thank you, Marko! Cheers!
@spiritualveda7828
@spiritualveda7828 3 жыл бұрын
Wonderful!!But can you please make a arduino display that can show us heart rate , pulse. Please 🙏🙏🙏🙏
@shanuka6
@shanuka6 2 жыл бұрын
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😉😇😃
Biggest TFT 7" for Arduino or ESP32 - Parallel Communication
10:16
Electronoobs
Рет қаралды 52 М.
DAD LEFT HIS OLD SOCKS ON THE COUCH…😱😂
00:24
JULI_PROETO
Рет қаралды 13 МЛН
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 6 МЛН
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 13 МЛН
Using a 2.8in SPI LCD Touchscreen ILI9341 with an ESP32 on the new Arduino IDE 2
10:34
Simple ILI9341 LCD Display With ESP32 Dev Module Step By Step
10:11
3.5" TFT Color TOUCH Display-DRIVER ILI9488 for NodeMcu ESP32
8:06
Смартфон УЛУЧШАЕТ ЗРЕНИЕ!?
0:41
ÉЖИ АКСЁНОВ
Рет қаралды 1,1 МЛН
Choose a phone for your mom
0:20
ChooseGift
Рет қаралды 7 МЛН
АЙФОН 20 С ФУНКЦИЕЙ ВИДЕНИЯ ОГНЯ
0:59
КиноХост
Рет қаралды 1,1 МЛН