Need help - unable to light up ST7789 screen via Arduino IDE

mgsvamp
Posts: 3
Joined: Wed Jul 16, 2025 1:27 pm

Need help - unable to light up ST7789 screen via Arduino IDE

Postby mgsvamp » Wed Jul 16, 2025 1:46 pm

Using Arduino IDE version 2.3.6
DevKit: ESP32-S3-USB-OTG
Board: ESP32 S3 MINI 1
Screen: ST7789
Library: TFT_eSPI 2.5.43
user_setup.h:
#define ST7789_DRIVER

#define TFT_RGB_ORDER TFT_BGR

#define TFT_WIDTH 240
#define TFT_HEIGHT 240

#define TFT_MOSI 7
#define TFT_SCLK 6
#define TFT_CS 5
#define TFT_DC 4
#define TFT_RST 8
#define TFT_BL 9


Tried multiple times but couldn't get the screen to light up. Seeking HELP.
Thanks in advance.

lbernstone
Posts: 1132
Joined: Mon Jul 22, 2019 3:20 pm

Re: Need help - unable to light up ST7789 screen via Arduino IDE

Postby lbernstone » Thu Jul 17, 2025 3:06 am

You can try setting TFT_BACKLIGHT_ON, but I find it easier to just manually set the backlight level:

Code: Select all

analogWrite(TFT_BL, 128); // 0-255

horace99
Posts: 35
Joined: Mon Oct 14, 2024 10:38 am

Re: Need help - unable to light up ST7789 screen via Arduino IDE

Postby horace99 » Fri Jul 18, 2025 9:00 am

which file in Arduino\libraries\TFT_eSPIUser_Setups did you edit?
with the ESP32-S3-DevKitC-1 and Waveshare General 2inch LCD Display Module IPS Screen 240×320 ST7789
I used Documents\Arduino\libraries\TFT_eSPIUser_Setups/Setup71_ESP32_S2_ST7789.h
and setup Documents\Arduino\libraries\TFT_eSPI\User_Setup_Select.h to select that file

what output do you get on the Arduino IDE serial monitor?

with ESP32S3 I found that using ESP32 core 2.3.0 and 2.0.17 it goes into a reboot loop
using ESP32 core 2.0.14 works OK

lbernstone
Posts: 1132
Joined: Mon Jul 22, 2019 3:20 pm

Re: Need help - unable to light up ST7789 screen via Arduino IDE

Postby lbernstone » Fri Jul 18, 2025 5:10 pm

With TFT_eSPI, I put a build_opt.h in the sketch folder with the following contents. This makes it more portable (and versionable). You need the USE_HSPI_PORT macro. I then put analogWrite(TFT_BL, TFT_BL_LEVEL); in setup() after init'ing the device. https://wokwi.com/projects/436838160182099969

Code: Select all

-DST7789_DRIVER
-DTFT_SDA_READ
-DTFT_WIDTH=240
-DTFT_HEIGHT=320
-DTFT_CS=12
-DTFT_MOSI=7
-DTFT_SCLK=5
-DTFT_DC=9
-DTFT_RST=11
-DTFT_BL=3
-DTFT_BL_LEVEL=250
-DTFT_INVERSION_OFF
-DTFT_ROT=3
-DLOAD_FONT2
-DLOAD_FONT4
-DLOAD_FONT6
-DUSER_SETUP_LOADED
-DSPI_FREQUENCY=40000000
-DUSE_HSPI_PORT

mgsvamp
Posts: 3
Joined: Wed Jul 16, 2025 1:27 pm

Re: Need help - unable to light up ST7789 screen via Arduino IDE

Postby mgsvamp » Sat Jul 19, 2025 1:21 am

which file in Arduino\libraries\TFT_eSPIUser_Setups did you edit?
with the ESP32-S3-DevKitC-1 and Waveshare General 2inch LCD Display Module IPS Screen 240×320 ST7789
I used Documents\Arduino\libraries\TFT_eSPIUser_Setups/Setup71_ESP32_S2_ST7789.h
and setup Documents\Arduino\libraries\TFT_eSPI\User_Setup_Select.h to select that file

what output do you get on the Arduino IDE serial monitor?

with ESP32S3 I found that using ESP32 core 2.3.0 and 2.0.17 it goes into a reboot loop
using ESP32 core 2.0.14 works OK
Thanks. I met the same issue that stuck in a reboot loop as well. I will try this solution to see if it can lead to a positive result.

mgsvamp
Posts: 3
Joined: Wed Jul 16, 2025 1:27 pm

Re: Need help - unable to light up ST7789 screen via Arduino IDE

Postby mgsvamp » Sat Jul 19, 2025 1:23 am

With TFT_eSPI, I put a build_opt.h in the sketch folder with the following contents. This makes it more portable (and versionable). You need the USE_HSPI_PORT macro. I then put analogWrite(TFT_BL, TFT_BL_LEVEL); in setup() after init'ing the device. https://wokwi.com/projects/436838160182099969

Code: Select all

-DST7789_DRIVER
-DTFT_SDA_READ
-DTFT_WIDTH=240
-DTFT_HEIGHT=320
-DTFT_CS=12
-DTFT_MOSI=7
-DTFT_SCLK=5
-DTFT_DC=9
-DTFT_RST=11
-DTFT_BL=3
-DTFT_BL_LEVEL=250
-DTFT_INVERSION_OFF
-DTFT_ROT=3
-DLOAD_FONT2
-DLOAD_FONT4
-DLOAD_FONT6
-DUSER_SETUP_LOADED
-DSPI_FREQUENCY=40000000
-DUSE_HSPI_PORT
Thank you for providing a new direction. Let me take a look and have a try.

Who is online

Users browsing this forum: DuckDuckGo [Bot], PerplexityBot and 1 guest