I can’t get my Kedei 2 inch LCD spi display to work with my esp32s3 sense. The display works great with my xiao esp32c3. Using the same pin out and sketch, I get nothing on the s3. I’m using the Bodmer’s tft_espi library from git hub for this project. I posted this same question on their discussion page with no responses. I’m hoping for some help here. My test code is below; It’s pretty simple. I’m just setting the color on the display.
The defines at the end are for the pins that I’m using on the two boards and defined in the tft_espi setup file. On the c3, I get the red screen that I’m asking for and any other library command I send. On the s3, I just get a black sreen for any command. The tft_espi library does support the s3 but everything I’ve found refers to the dev boards. The spi pins are the same for c3 and s3 and the others should be a general I/O (???). I’m kind of stuck on this one so if anyone has any ideas, I would appreciate the help.
I wish I could be of more help. It works well on my c3 also with zero problems. I did get a response on my other post from seeed on the problems I’m having filling up the entire screen. They just said that they tested the s3/7789 combination and it works fine? Not much information there but I asked for more. We’ll see how they respond.
I have the same versions on my computer(s). I’ve tried a few things since last posted.
I loaded a new computer with the ide and the tft_espi libraries. With all the same settings I got no display at all. After I tried the new install, I copied over the Arduino directory from the first computer that kind of works and replaced the Arduino directory on the new computer. With that setup, I still got no display and couldn’t get it to work. While I was changing things on both computers trying to understand what the difference was, the first computer quit working also and I can’t figure out what changed. That is where I gave up for now and figured that the tft_espi lib is not so great with the Seeed XIAO s3 board if you can’t use the esp32s3 spi pins.
From there, I went to the Adafruit wiki and tried their setup and …badabingbadaboom…, it works fine. It works fine as long as you use the Adafruit GFX library. I tried a thing using the Adafruit ST7789 driver with the tft_espi libraries wishing that they would somehow work together. No luck. I got the screen to light up but only the 240x240 pixel area would work just like when I got the tft_espi drivers to kinda work before.
The only real reason I’m chasing the tft_espi library is that I like the way that it handles sprites and transparency. It looks like the Adafruit GFX libraries have addons that will do that, so that is probably what I’m going to do from this point. I also ordered an Adafruit s3 board that has the actual SPI pins available to play with…
Although having issues with the ESP32-S3 with a ST7789 display that is connected via SPI can be aggravating, many problems can be fixed with patient investigation. Here are some typical issues and potential fixes:
No Output on the Display:
Check the connections between the ESP32-S3 and the ST7789 display if you’re not receiving any display output. Make sure the SPI pins, such as MOSI, MISO, and SCLK, are connected properly.
2. Improper Wiring
Check the accuracy of the wiring going from the ESP32-S3 to the ST7789. Verify that the pin assignments in your code correspond to the connections you have made physically.
3. Power Concerns
Check to see if the voltage and current being delivered to the ST7789 display are appropriate. Some displays need a certain amount of electricity to function properly. Verify your connections and power source.
That is good advice Hasan. But I think if you look back at the posts you will see that this has been addressed. Without changes to the wiring connections or the sketch, the LCD worked with both the esp32-c3 using the tft-espi libraries and with s3 using the Adafruit GFX libraries.
I finally figured out where I was messing up. Duhh. The problem was simply that I was using the Pin numbers of the board. If I use the GPIO numbers for those pins it works great. What led me down the right track was I got a UM Tiny S3 board that doesn’t label pins as a pin number, but uses the GPIO numbers on the board. What threw me was that using the pin numbers works on the XIAO C3 board. The reason is that the pin number and the GPIO number are the same for that board.