Working with ESP32-S3
Hardware Connection
Use 15PIN jumper wires to connect the module to the ESP32-S3 according to the table below:
| LCD Pin | ESP32-S3 |
|---|---|
| VCC | NC |
| 3V3 | 3V3 |
| GND | GND |
| MISO | GPIO 42 |
| MOSI | GPIO 2 |
| SCLK | GPIO 1 |
| SD_CS | GPIO 38 |
| LCD_CS | GPIO 39 |
| LCD_DC | GPIO 41 |
| LCD_RST | GPIO 40 |
| LCD_BL | GPIO 6 |
| TP_SDA | GPIO 15 |
| TP_SCL | GPIO 7 |
| TP_INT | GPIO 17 |
| TP_RST | GPIO 16 |
Configure the Arduino IDE
-
Install the Arduino IDE and Arduino ESP32 Core according to the Installing and Configuring the Arduino IDE.

-
Download and extract the 2inch Capacitive Touch LCD ESP32-S3 Examples.
-
Install the
GFX_Library_for_Arduinolibrary in the example package into the Arduino IDE. This library needs to be installed offline. For detailed methods, please refer to the library management section in the Arduino IDE tutorial above.
Arduino IDE Basics
If you have not yet compiled and uploaded an ESP32-S3 program using the Arduino IDE, you can check the development environment with the following test program:
-
Select "File" > "New Sketch" to create a new project:

-
Enter the following code, and select "File" > "Save As" to save the project:
void setup() {Serial.begin(115200);}void loop() {Serial.println("Hello, World!");delay(2000);}
-
Select "ESP32S3 Dev Module" and the serial port corresponding to the development board:

-
If the development board only provides a native USB interface, set "USB CDC On Boot" to "Enabled" in the "Tools" menu:

-
Compile and upload the program. After the upload is complete, the Arduino IDE output window will show a reset prompt:

-
Open the serial monitor and set the baud rate to 115200. The serial monitor outputs
Hello, World!every 2 seconds:
Run the Example
-
Use the Arduino IDE to open the
2inch_Capacitive_Touch_LCD_Demo_ESP32S3/2inch_Capacitive_Touch_LCDexample.
-
Select the development board model and serial port according to the ESP32-S3 development board you are actually using, and adjust the pin configuration in the example according to the development board's resources.

-
If the development board only provides a native USB interface, enable "USB CDC On Boot" in the Arduino IDE.
-
Compile and upload the program.

After the program runs, the screen enters the touch drawing board interface. Open the serial monitor to also view the TF card capacity recognized by the program.
