Connecting ESP32 S2 Mini with TFT ST7735S Screen using Micropython

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today we're going to be working with the esp32s2 micropython and getting an st-7735s board or display to work it's a TFT screen they're pretty inexpensive on AliExpress you can get these boards from as little as 198 each when I first started to try to get this to work it was quite cumbersome because the pins on the display did not line up or they did not make sense to me because the pins on the display have ground VCC let's look at this so there's eight pins listed on the back the pins that are on the device are ground VCC sck SDA res rs-c-s and then led a so what we're going to need to do now is to figure out what internal pins the ESP is using for its SPI connection now we could Define the SPI connection just using software using micropython itself but the built-in Hardware on the SP or the espressive Chip is going to allow for a faster connection since this is a display board you're probably going to want to have the highest refresh speed that you can have so we are going to enter in some commands to find out what the SPI pins are already defined as and we'll do that import machine uh prints machine dot in SBI and one there we go so with this information we can take the output from the machine pin SPI and we want to write it down in our notes I've made this sheet for you where you can fill out what the sck and SDA are and remember SDA is the mostly value on machine pin 1 and sck is just the sck value so you're going to want to have already downloaded the files in the repository that I made for you guys if you look at the download in the required drivers and files you'll see that you want to download these two and this one from the two different repository links and you're going to want to push those onto the board you will also want to put the boot.pi from the repository Linked In the description and that's the main file that we're going to be using for the rest of this tutorial so this is how we're going to wire it up the board already takes the 5 volt input from the USB on the right side web V bus we're just going to snag the ground on the outmost pins there are pins underneath this but we're just using the outermost row so you'll want to connect the 3v3 to your power rail positive on the bottom the ground to the top and then this shows you how they're wired so on the TFT screen on the left ground is to ground the esp32 VCC is to 3v3 sck is to sck in my case it's pin seven if you're on the esp32s2 you'll have to run that command printmachine.spi1 to see what the SK sck and what the SDAR SDA is also called MOSI SEK is connected to sck SDA is connected to MOSI reset is connected to this is what we defined I I Define pin 9 because it was close to the other ones same with five and three and the last thing is led a pin led a which is the backlight now right now I just have a resistor coming from 3v3 so this is how we're going to wire everything up and SDA here is also called MOSI so once you wire it up like this you should be able to connect now let's take a look at what that looks like once you have it wired up properly you will want to open up the boot.pi file so the boot.pi file there is a function at the top has the Imports we want to scroll down to this section um that doesn't say begin user uh I modified it later but you're going to want to change the tftcs TFT reset and TFT a 0. those are the only thing three that you have to enter in these two they're commented out 11 and 7 because those are based off of the internal pins and actually since we are saying SPI equals SPI this pulls it from the machine Library so it will pull it from SPI one so if by chance you're on a board and you try to use SPI 2 you will also want to modify this to be SPI 2. I can actually use SPI 2 on the esp32 S2 the output is actually using sck 36 and most e35 five but I don't want to confuse you so just modify these three these pins if you have different pins than I do and the rest of the code should work so I have connected it and now I'm going to run boot.fi I'm going to save it and I'm going to run it let's see what the board does awesome it runs the test command that we put inside of it so now we have the 1.77 TFT screen running on a micropython board through SPI connection if you like my tutorials please like or subscribe um I'm really excited about many projects I mostly work on open source and open Hardware projects such as openmuscle which is a open source AI prosthetic sensor and I love doing YouTube in the side but I just wanted to share today uh how I got the s t 7735s integrated circuit driver board to work the TFT screen to work on an esp32 S2 mini by wemos using micro python I know that's a mouthful but some some of these things you just have to Brute Force through like why are there different names there's lots of trial and error involved there's probably a way where you could do this a little bit more structured but that's not my style so as always uh thanks for watching and let's see if we can make a positive difference in this world
Info
Channel: TURFPTAx
Views: 3
Rating: undefined out of 5
Keywords:
Id: zY1i7GahE40
Channel Id: undefined
Length: 6min 49sec (409 seconds)
Published: Sat Jun 10 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.