ESP32-S3-Touch-LCD-2.1

From Waveshare Wiki
Jump to: navigation, search
ESP32-S3-Touch-LCD-2.1
300px

2.1inch
480×480
I2C, SPI
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

Overview

Parmaeters

Items Parameters
Interface USB Type-C/UART Type-C
Controller ESP32-S3
LCD Type TFT
LCD Controller Display: ST7701
Touch: CST820
Onboard Devices Positure sensor: QMI8658
RTC clock: PCF85063
Micro SD
Buzzer
Battery Charging Manager Module
Dimensions 73.06(H)x 50.54(V) mm

Onboard Interface

  • 12PIN connector
PIN NO. PIN FUNC Description
1 GND GND Ground
2 VBus 5V USB Power Supply
3 D- USB differential cable(GPIO19) USB differential cable or as GPIO
4 D+ USB differential cable(GPIO20) USB differential cable or as GPIO
5 GND GND Ground
6 3V3 3V3 3.3V external output
7 SCL SCL (GPIO7) I2C clock pin, cannot be used as GPIO
8 SDA SDA (GPIO15) I2C data pin, cannot be used as GPIO
9 TXD TXD (GPIO43) UART transmit data or as GPIO
10 RXD RXD (GPIO44) UART receive data or as GPIO
11 NC NC Not connected
12 IO0 GPIO0 Spare pinout
  • I2C interface
PINOUT FUNC Description
GND GND Ground
3V3 3V3 3.3V external output
SCL SCL (GPIO7) I2C clock pin, cannot be used as GPIO
SDA SDA (GPIO15) I2C data pin, cannot be used as GPIO
  • UART interface
PINOUT FUNC Description
GND GND Ground
3V3 3V3 3.3V external outpout
TXD TXD (GPIO43) UART transmit data or used as GPIO
RXD RXD (GPIO44) UART receive data or used as GPIO

Onboard Functions

Internal Hardware COnnection

LCD

LCD PIN ESP32S3
LCD_BL GPIO6
LCD_RST EXIO1
LCD_SDA GPIO1
LCD_SCL GPIO2
LCD_CS EXIO3
PCLK GPIO41
DE GPIO40
VSYNC GPIO39
HSYNC GPIO38
B0 NC
B1 GPIO5
B2 GPIO45
B3 GPIO48
B4 GPIO47
B5 GPIO21
G0 GPIO14
G1 GPIO13
G2 GPIO12
G3 GPIO11
G4 GPIO10
G5 GPIO9
R0 NC
R1 GPIO46
R2 GPIO3
R3 GPIO8
R4 GPIO18
R5 GPIO17
TP_SDA GPIO15
TP_SCL GPIO7
TP_INT GPIO16
TP_RST EXIO2

SD Card

SD Card ESP32S3
SD_D0/MISO GPIO42
SD_CMD/MOSI GPIO1
SD_SCK/SCLK GPIO2
SD_D3/CS EXIO4
SD_D1 NC
SD_D2 NC

QMI

QMI8658C ESP32S3
IMU_SCL GPIO7
IMU_SDA GPIO15
IMU_INT1 GPIO6
IMU_INT2 GPIO5

RTC

PCF85063ATL ESP32S3
RTC_SCL GPIO7
RTC_SDA GPIO15
RTC_INT GPIO7

Speaker

Buzzer ESP32S3
Buzzer_Control EXIO8

Working with Arduino

  • Please note that the ESP32 3.0.2 on Arduino is based on ESP-IDF v5.1, which is quite different from the previous ESP-IDF V4.X. After the following operations, the original demo may need to be adjusted for normal operation.
  • Please note that the computer user name must be English, the user name in Chinese will lead to compilation errors.

Environment Set-up

ESP32-C6-DEV-KIT-N8-Arduino01.png

  • Enter Arduino IDE after installation.

ESP32-C6-DEV-KIT-N8-Arduino02.png

  • Go to the board manager, search for esp32, select the latest version of esp32 by Espressif Systems at the bottom, and click install (if it doesn't install correctly, you can try using a phone hotspot).

ESP32-S3-DEV-KIT-N8-Arduino07.png

  • Restart the Arduino IDE after installation, and then you can use it.

ESP32-S3-DEV-KIT-N8-Arduino09.png

If the installation fails

  • Failed to install 3.0.2 version:

ESP32-Arduino-3.0.2 Fail 1.png

ESP32-Arduino-3.0.2 Fail 2.png

  • Click on the path from the resource manager "c:\Users\Waveshare\AppData\Local\Arduino15\staging\packages" (Waveshare is the user name of the computer, and you need to turn on Show Hidden Files).

ESP32-Arduino-3.0.2 Fail 3.png

  • Unzip the downloaded files to the packages file folder:

ESP32-Arduino-3.0.2 Fail 4.png

  • Install it again:

ESP32-Arduino-3.0.2 7.png

  • Restart the Arduino IDE after installation and you're ready to go!

ESP32-Arduino-3.0.2 9.png

Modify Environment and Install Library Files

Modify Environment

  • Enter the path "C:\Users\Waveshare\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef" (Waveshare is the computer username).

ESP32-S3-Touch-LCD-2.1 Lib 1.png

  • Save the esp32s3 folder in the current folder.
  • Please save the original esp32s3 folder used for subsequent restoration!!!! (You can compress the file directly and make a copy to another location, currently the original file is compressed to esp32s3 - Original file.zip)

ESP32-S3-Touch-LCD-2.1 Lib 2.png

  • Delete the original file (Please save the original esp32s3 folder used for subsequent restoration!!!!)

ESP32-S3-Touch-LCD-2.1 Lib 3.png

  • Copy the provided esp32s3 file to the current directory:

ESP32-S3-Touch-LCD-2.1 Lib 4.png
ESP32-S3-Touch-LCD-2.1 Lib 5.png

  • Complete the modification of ESP32S3 configuration.

ESP32-S3-Touch-LCD-2.1 Lib 6.png

Install Libraries

  • Please note if this library has already been installed previously. If it has, please save the existing library to prevent errors or failures when running other demos.
  • Enter the sample demo file "ESP32_S3_Touch_LCD_2.8\LVGL_Arduino", double-click on LVGL_Arduino.ino to open it.
  • Search for the lvgl library and install it (this step is for creating the library file folder in Arduino environment, if you have installed other libraries before and the following file folder exists, you can skip this step.)

ESP32-S3-Touch-LCD-2.8 example 2.png

ESP32-S3-Touch-LCD-2.8 example 4.png

  • Enter "c:\Users\Waveshare\AppData\Local\Arduino15\packages\libraries" (Waveshare is the computer username).

ESP32-S3-Touch-LCD-2.8 example 3.png

  • Delete the lvgl library downloaded before (skip this step if you do not install this library before).

ESP32-S3-Touch-LCD-2.8 example 5.png

  • Please install the three libraries from the example file and create a new "Lib" folder in the example path.

ESP32-S3-Touch-LCD-2.8 example Add 1.png

  • Download and unzip the following libraries: (lvgl library, TFT_eSPIlibrary and audioI2S library), and then store them in the newly created "Lib" folder in the specified path.
  • Copy the above libraries in "c:\Users\Waveshare\AppData\Local\Arduino15\packages\libraries" (Waveshare is the computer username)

ESP32-S3-Touch-LCD-2.8 example 7.png

  • Next, install NTPClient library:

ESP32-S3-Touch-LCD-2.8 example 8.png

  • Install SensorLib library:

ESP32-S3-Touch-LCD-2.8 example 9.png

  • Finish.

Sample Demo

  • Reopen the example.
  • Select the model ESP32S3 Dev Module and port:

ESP32-S3-Touch-LCD-2.8 example 10.png

  • Set the board parameters:

ESP32-S3-Touch-LCD-2.8 example 11.png

  • Compile and upload the example:

ESP32-S3-Touch-LCD-2.8 example 12.png

  • Upon successful upload, you will observe two operational pages.
  • Page 1 displays the following parameters separately.
Parameters Function Description
SD Card Display SD card size Please note that only SD cards with below 16GB are supported
Flash Size Display Flash size The current onboard 16MB Flash
Angular deflection Display the angular deflection of the board Display the deflection of threen orientations
RTC Timr Display RTC time Display the current RTC time

If the RTC time is not consistent with the current time, it is because the power-down state does not retain data, if you need to keep the RTC time normal, you need to connect the RTC battery and update the RTC time.

Wireless number Display the scanned WiFi and Bluetooth numbers When it finishes, display "Scan Finish" at the end.
  • Page 2 is the UI page for playing mp3 audio from the root directory of the SD card.

Resource

Library

Sample Demo

Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)