Easy ILI9341 + ESP32 LCD TFT Display Tutorial (SPI/Bodmer)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
here's a quick tutorial that shows you how to get an II 9341 TFT LCD display working with an esp32 the one I'm using here is the wave share 2.4 in LCD module this one features a 240x 320 pixel display what I like about this one is it's supplied with a ribbon cable that's really easy to hook up to the esp32 no soldering is required first up you should check that your display does actually support the I 93 41 driver this module does because it has it printed on the back of the panel if yours doesn't have this then check the listing where you bought it from be aware not all screens from the same supplier use the same drivers this is a smaller 1.5 in wave share display but it actually uses the SSD 1351 driver so opening up the Arduino IDE the first thing we need to do is to install the graphics Library so you need to go to tools and then manage libraries and then search for t F torei so we want this one by bodmer and if it's not installed then install it so this Graphics library is a little different to the others you have to configure it in the actual files rather than configuring it in your sketch the good news is that you only need to do this once however if you're using different screens then you'll need to change it every time you upload a sketch using a different type of screen so if you're using Windows the files are in C users your windows username documents Arduino libraries and TFT espi if you're using a different operating system then I would recommend searching for this user setup select. and you should be able to find it on your system somewhere so you need to open this file in a text editor so once it's opened you need to look for your particular display in it so I've highlighted all the II 9341 display drivers it comes with and there's quite a lot of them if you're using the wave share 320x 240 display that I'm using in this video then the one you want is user setup 42 so it's this file here so you need to ensure that you've only uncommented one of the display drivers remember to save this file as well before you edit your sketch so the user setup file itself is in the user setups folder so the good thing about this is that you should see the pins listed so this will help you with the pin diagram how to connect up the esp32 to your display so one thing about this display that puzzled me is that it has a backlight pin but this isn't on the smaller wave share OED that I have I'm not really a hardware expert but I know that some screens have to have a backlight if you're using the screen and you can't seem to see anything then you might need to add this line so it's tftbl is the pin and you can connect it to any pin on the ardino or possibly some of them I've used PIN five later in the video I'll show you how to test the backlight aside from that you shouldn't need to change anything in this file although I changed the Cs pin to zero because that's the one that I normally use rather than pin 15 so once you've configured your library I recommend using this digital rain example it's a really good demo one and really easy to get up and running so to use this one you need to go to tools man libraries and search for digital rain so it's this one digital rain animation by Eric Nam so again if it's not installed then install it once it's installed you can go to files examples and there should be one here it's not that one it's not the ESP rain maker by the way so the example is here for examples from Custom libraries where are we too many now okay so it's this one here digital r animation and I would use this one demo TFT espi basic so this is this example and it doesn't require any configuration at all so if you go to sketch upload the sketch then you should see this really neat Matrix like effect so another one that's quite easy to get working is the animated gif one check out this video on my channel because that explains how to get the animated gifs working so as you can see this animation looks pretty good on this screen screen it's not as smooth as the smallest screen but it does look pretty decent incidentally if you want to use this with really large animated gifs then you have to go to tools and then partition scheme here and I would change it to huge app so you can probably get an animated gif up to 3 mbytes in size the one I'm using is 1.1 megabytes so I must admit I found the backlight a bit confusing so if you want to test your backlight of your TFT display then go to file and then examples and under Basics open the blink sketch where it says LED builtin here you just need to change this to the pin number of the pin that the backlight pin is connected to so mine was connected to pin five so change all these oh five okay so I've changed those and just upload the sketch so now you can see that it's blinking the backlight on and off so it just kind of proves that backlight works I'm not too sure of the purpose of the backlight in this particular OLED display it just seems to make the screen all white when you turn it on and then it goes black when you turn it off again however I do have this really old TFT display and it seems to require a backlight you can't see anything if it's not on so here's a little comparison of the the 1.5 in LED wave share display and the 2.4 in display I think they're both very decent displays it's really nice that they come with screws so that if you're using it with a hardware project you can easily screw it into whatever you're making so I hope you found this video useful thanks for watching
Info
Channel: Coding With Brett
Views: 2,254
Rating: undefined out of 5
Keywords: 2.8in spi lcd touchscreen, esp32 tutorial, ili9341 tft_espi
Id: g1OknIhJa30
Channel Id: undefined
Length: 6min 20sec (380 seconds)
Published: Wed Apr 17 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.