• sales

    +86-0755-88291180

ESP32-S3-Touch-LCD-7C-BOX User Guide

Product Introduction

Product Overview

This is a microcontroller development board designed by Waveshare, supporting 2.4GHz Wi-Fi and BLE 5, integrating Flash and PSRAM, and featuring an onboard 7inch capacitive touch LCD screen capable of running GUI programs such as LVGL. It provides a variety of peripheral interfaces for HMI and related application development with the ESP32-S3. The audio section offers both 3.5mm and MX1.25 audio connectors, with an onboard ES8389 audio codec and ES7210 audio capture chip for speaker output and microphone capture.

SKUProduct
34894ESP32-S3-Touch-LCD-7C-BOX

Features

  • Equipped with Xtensa 32-bit LX7 dual-core processor, main frequency up to 240MHz
  • Supports 2.4 GHz Wi-Fi (802.11 b/g/n) and Bluetooth 5 (LE) with an onboard antenna
  • Built-in 512KB SRAM and 384KB ROM, stacked with 32MB Flash and 16MB PSRAM
  • Onboard 7inch LCD capacitive touchscreen, 800 × 480 resolution, 65K colors
  • Supports I2C interface control for capacitive touch, with 5-point touch, and supports interrupts
  • Onboard ES8389 audio codec and ES7210 echo cancellation circuit
  • Onboard voltage regulator, supporting 7 ~ 36V wide-voltage power supply
  • Onboard RTC chip and battery holder, retaining time after power-off when a battery is installed
  • Onboard BQ27220 fuel gauge for real-time battery capacity monitoring
  • Onboard I2C interface, TF card slot, PH2.0 battery connector
  • Onboard LED indicators for power status, battery charging status, and a user-definable STA status LED
  • Supports flexible clock and independent power supply settings for precise control, enabling low-power modes in various scenarios

Onboard Resources



Dimensions



Working with Arduino

This chapter contains the following sections. Please read as needed:

Arduino Getting Started

New to Arduino ESP32 development and looking for a quick start? We have prepared a comprehensive Getting Started Tutorial for you.

Note: This tutorial uses the ESP32-S3-Zero as a reference example, and all hardware code is based on its pinout. Before you start, we recommend checking the pinout of your development board to ensure the pin configuration is correct.

Setting Up the Development Environment

1. Installing and Configuring the Arduino IDE

2. Selecting Board and Port

  • After connecting the ESP32-S3-Touch-LCD-7C to your computer, select the corresponding serial port in the "Tools" menu.

3. Example Code Package and Libraries

  • The Arduino example programs and required library files for the ESP32-S3-Touch-LCD-7C are included in the example code package.
  • After extraction, the Arduino examples are located in the Arduino/examples directory, and the library files are in the Arduino/libraries directory. You can add the libraries to the Arduino IDE following the general Arduino tutorial.

ESP32-S3-Touch-LCD-7C Board Installation Requirements

Board NameInstallation RequirementVersion Requirement
ESP32 by Espressif Systems"Offline" / "Online" installation3.5.5
ESP32-audioI2S-master"Online" installation3.4.6
LVGL"Online" installation8.4.0

Parameter Configuration


Example

ExampleBasic Description
01_I2CTest I2C interface communication
02_RTCTest RTC real-time clock functionality
03_LCDTest LCD display functionality
04_ISOLATION_IOTest isolated I/O functionality
05_SDTest TF card read/write functionality
06_TOUCHTest touchscreen functionality
07_DISPLAY_BMPDisplay BMP images
08_BAT_INFOTest battery information reading
09_SPEAKER_MICROPHONETest speaker and microphone
10_LVGL_CODECLVGL codec example

01_I2C

Hardware Connection

  • Connect the development board to a computer using a USB cable.

Code

I2C Backlight Control Code

Code Analysis

  • DEV_I2C_Init(): Initializes the I2C bus in preparation for communication with the I/O expansion chip.
  • IO_EXTENSION_Init(): Initializes the external I/O expansion chip.
  • IO_EXTENSION_Output(IO_EXTENSION_IO_2, 1/0): Controls IO_2 to output high/low level, used to turn the LCD backlight on/off.
  • delay(500): Controls the blinking rhythm of the backlight to make it easy to observe whether the output is normal.

Operation Result

  • You will see the LCD backlight blinking.

02_RTC

Hardware Connection

  • Connect the development board to a computer using a USB cable.

Code

RTC Time Reading Code

Code Analysis

  • PCF85063A_Read_now(&Now_time): Reads the current time from the PCF85063A RTC into Now_time.
  • datetime_to_str(datetime_str, Now_time): Converts the time structure to a string for easy output and display.
  • printf("Now_time is %s..."): Outputs the current time via serial port to verify whether the RTC is working properly.
  • IO_EXTENSION_Rtc_Int_Read() == 0: Reads the RTC interrupt pin state; low level indicates the alarm has triggered.
  • PCF85063A_Enable_Alarm(): Re-enables the alarm after it triggers, facilitating repeated trigger tests.
  • delay(1000): Updates the time and checks the alarm every second.

Operation Result

  • The RTC time is printed over the serial port.



03_LCD

Hardware Connection

  • Connect the development board to a computer using a USB cable.

Code

LCD Display Test Code

Code Analysis

  • Paint_DrawString_EN(...): Draws an English string at the specified coordinates, with configurable font, foreground color, and background color.
  • Paint_DrawNum(...): Draws a floating-point number using the specified font and format parameters (used here to verify number rendering).
  • Paint_DrawString_CN(...): Draws a Chinese string to verify Chinese font and display effects.

Operation Result

  • Test content is displayed on the screen.

  • You will see text, graphics, and image display effects.

    ESP32-S3-Touch-LCD-7C-IDF-example-3


04_ISOLATION_IO

Hardware Connection

  • Connect the development board to a computer using a USB cable.

Operation Result

  • After successful flashing, if all I/O connections are successful, the screen turns green; otherwise, it turns red.

05_SD

Hardware Connection

  • Connect the development board to a computer using a USB cable.
  • Insert a TF card into the development board.

Code Analysis

  • setup():
    • Initialize the TF card.
  • loop():
    • Tests TF card read/write functionality.

Operation Result

  • The screen displays TF card information and test results.



06_TOUCH

Hardware Connection

  • Connect the development board to a computer using a USB cable.

Code Analysis

  • setup():
    • Initializes the touchscreen.
  • loop():
    • Tests multi-touch functionality.

Operation Result

  • Touching the screen works normally.
  • You will see touch points displayed on the screen.

07_DISPLAY_BMP

Hardware Connection

  • Connect the development board to a computer using a USB cable.
  • Insert a TF card containing BMP images.

Code Analysis

  • setup():
    • Initializes the TF card and LCD.
  • loop():
    • Reads and displays BMP images.

Operation Result

  • BMP images are displayed on the screen.



08_BAT_INFO

Hardware Connection

  • Connect the development board to a computer using a USB cable.
  • Connect a Lithium battery to the development board.

Code

Battery Information Reading Code

Code Analysis

  • BATTERY_CAPACITY_MAH: Configures the nominal battery capacity for charge estimation and display.
  • Serial.begin(115200): Initializes serial output for debugging.
  • DEV_I2C_Init(): Initializes the I2C bus for communication with the fuel gauge and I/O expansion chip.
  • battery_init(BATTERY_CAPACITY_MAH): Initializes the battery/fuel-gauge module and returns the current battery status.
  • IO_EXTENSION_Init() / display_init(): Initializes the I/O expansion and display modules in preparation for UI display.
  • battery_get_info(&bat_info): Periodically reads battery information and stores it in bat_info.
  • display_show_info(...) / display_show_not_connect() / display_show_error(...): Displays battery info, not-connected prompt, or error message on the screen according to the read status.
  • delay(1000): Refreshes the battery information display every second.

Operation Result

  • Battery information is displayed on the screen.



09_SPEAKER_MICROPHONE

Hardware Connection

  • Connect the development board to a computer using a USB cable.
  • Connect the speaker and microphone.

Code Analysis

  • setup():
    • Initializes the audio codec.
  • loop():
    • Tests audio input and output functionality.

Operation Result

  • You can record audio via the microphone and play it back through the speaker.



10_LVGL_CODEC

Hardware Connection

  • Connect the development board to a computer using a USB cable.

Code Analysis

  • setup():
    • Initializes the LVGL graphics library.
  • loop():
    • Tests LVGL codec functionality.

Operation Result

  • The LVGL interface is displayed on the screen, and music can be played normally (a TF card must be inserted in advance).



Working with ESP-IDF

Overview

The ESP32-S3-Touch-LCD-7C board features a 7inch capacitive touchscreen, audio module, and commonly used peripherals, making it suitable for applications such as graphical user interface display, voice interaction, and human-machine interface development.

INFO

For the ESP32-S3-Touch-LCD-7C development board, the examples default to ESP-IDF V5.5.3. If compilation fails with other versions, you can fall back to this version for testing.

Getting Started

This chapter includes the following sections:

ESP-IDF Getting Started

New to ESP32 ESP-IDF development and looking to get started quickly? We have prepared a general Getting Started Tutorial for you.

Please Note: This tutorial uses the ESP32-S3-Zero as a teaching example, and all hardware code is based on its pinout. Before you start, it is recommended that you check the pinout of your development board to ensure the pin configuration is correct.

Setting Up the Development Environment

NOTE

The following guide uses Windows as an example, demonstrating development using VS Code + the ESP-IDF extension. macOS and Linux users should refer to the official documentation.

VERSION SELECTION

The screenshots in this section use ESP-IDF V5.5.2 as an example. When installing, please select the ESP-IDF version that matches your board's example.

Install the ESP-IDF Development Environment

  1. Download the installation manager from the ESP-IDF Installation Manager page. This is Espressif's latest cross-platform installer. The following steps demonstrate how to use its offline installation feature.

    Click the Offline Installer tab on the page, then select Windows as the operating system and the ESP-IDF version you need (the version shown in the screenshot is for reference only — choose the version that fits your actual needs).


    After confirming your selection, click the download button. The browser will automatically download two files: the ESP-IDF Offline Package (.zst) and the ESP-IDF Installer (.exe).


    Please wait for both files to finish downloading.

  2. Once the download is complete, double-click to run the ESP-IDF Installer (eim-gui-windows-x64.exe).

    The installer will automatically detect if the offline package exists in the same directory. Click Install from archive.


    Next, select the installation path. We recommend using the default path. If you need to customize it, ensure the path does not contain Chinese characters or spaces. Click Start installation to proceed.


  3. When you see the following screen, the ESP-IDF installation is successful.


  4. We recommend installing the drivers as well. Click Finish installation, then select Install driver.


Install Visual Studio Code and the ESP-IDF Extension

  1. Download and install Visual Studio Code.

  2. During installation, it is recommended to check Add "Open with Code" action to Windows Explorer file context menu to facilitate opening project folders quickly.

  3. In VS Code, click the Extensions icon Extensions Icon in the Activity Bar on the side (or use the shortcut Ctrl + Shift + X) to open the Extensions view.

  4. Enter ESP-IDF in the search box, locate the ESP-IDF extension, and click Install.


  5. For ESP-IDF extension versions ≥ 2.0, the extension will automatically detect and recognize the ESP-IDF environment installed in the previous steps, requiring no manual configuration.

WARNING

If installation fails or a reinstall is needed, you can try deleting the C:\Users\%Username%\esp and C:\Users\%Username%\.espressif folders and then retry.

Flashing Example

  1. After installing the ESP-IDF development environment, select the folder to open the example.


  2. In the pop-up window, select the example under the ESP-IDF directory within the extracted example package, and click to select a file.


  3. To upload the corresponding code to the ESP32-S3, use a Type-C to Type-A cable to connect the USB TO UART Type-C interface of the ESP32-S3-Touch-LCD-7C to a USB port on your computer.

  4. If this is the first time flashing a new project, you need to select the detected COM port. For example, here it is detected as COM36.


  5. Select the download method: UART.


  6. Next, select the main chip as ESP32S3.


    • Select the openocd path. This does not affect the process, so choose the first one.


  7. Click the one-click Build Flash Monitor button below to sequentially execute Build --> Flash --> Monitor.


  8. The development board has an onboard automatic download circuit, so no manual operation is required for automatic download. Wait for compilation and flashing to complete. The first compilation may take a while.


Example

Below are the purpose, key points, and operational effects for each example (for quick start).

ExampleBasic Description
01_I2CTest I2C interface communication
02_RTCTest RTC real-time clock functionality
03_LCDTest LCD display functionality
04_ISOLATION_IOTest isolated I/O functionality
05_BAT_INFOTest battery information reading
06_SDTest TF card read/write functionality
07_TOUCHTest touchscreen functionality
08_DISPLAY_BMPDisplay BMP images
09_SPEAKER_MICROPHONETest speaker and microphone
10_LVGL_CODECLVGL codec example

01_I2C

Hardware Connection

  • Connect the development board to a computer using a USB cable.

Code

Backlight Control Code

Code Analysis

  • while (1): Continuously loops the backlight on/off test logic.
  • IO_EXTENSION_Output(IO_EXTENSION_IO_2, 1): Sets IO_2 of the I/O expansion chip to high level to turn on the LCD backlight.
  • IO_EXTENSION_Output(IO_EXTENSION_IO_2, 0): Sets IO_2 to low level to turn off the LCD backlight.
  • vTaskDelay(500 / portTICK_PERIOD_MS): Delays for approximately 500 ms to control the blinking rhythm of the backlight.

Operation Result

  • You will see the LCD backlight blinking.

02_RTC

Hardware Connection

  • Connect the development board to a computer using a USB cable.

Code

RTC Initialization Code

Code Analysis

  • DEV_I2C_Init(): Initializes the I2C bus in preparation for communication with the RTC and I/O expansion chip.
  • IO_EXTENSION_Init(): Initializes the external I/O expansion chip (used for reading/writing peripheral signals such as RTC interrupts).
  • PCF85063A_Init(): Initializes the PCF85063A RTC chip.
  • PCF85063A_Set_All(Set_Time): Sets the current time on the RTC.
  • PCF85063A_Set_Alarm(Set_Alarm_Time): Sets the RTC alarm time.
  • PCF85063A_Enable_Alarm(): Enables the alarm interrupt to trigger alarm notifications.

Operation Result

  • The RTC time is printed over the serial port.


03_LCD

Hardware Connection

  • Connect the development board to a computer using a USB cable.

Code Analysis

  • app_main():
    • Initializes the LCD display.
    • Tests LCD display functionality.
    • Displays text, graphics, and images.

Operation Result

  • After successful flashing, the screen displays test content.

  • You will see text, graphics, and image display effects.


04_ISOLATION_IO

Hardware Connection

  • Connect the development board to a computer using a USB cable.

Code Analysis

  • app_main():
    • Initializes the isolated I/O.
    • Tests isolated I/O input and output functionality.

Operation Result

  • After successful flashing, if all I/O connections are successful, the screen turns green; otherwise, it turns red.

05_BAT_INFO

Hardware Connection

  • Connect the development board to a computer using a USB cable.
  • Connect a Lithium battery to the development board.

Code

Battery Information Display Code

Code Analysis

  • bat_info.ma > 0: In the current logic, positive current is treated as charging state; otherwise, it is treated as discharging.
  • sprintf(bat, "...", ...): Formats the battery percentage, voltage, current, temperature, remaining time, and other fields into a string for screen display.
  • Paint_DrawString_EN(...): Draws the battery information on the LCD; uses GREEN for charging and RED for discharging to indicate status.
  • waveshare_rgb_lcd_display(BlackImage): Refreshes the screen to display the drawn content.
  • ESP_LOGI("BQ27220", "...", ...): Outputs the same battery information to the serial log for debugging and cross-checking.

Operation Result

  • After successful flashing, the screen displays battery information.


06_SD

Hardware Connection

  • Connect the development board to a computer using a USB cable.
  • Insert a TF card into the development board.

Code Analysis

  • app_main():
    • Initializes the TF card.
    • Tests TF card read/write functionality.

Operation Result

  • After successful flashing, the screen displays TF card information and test results.


07_TOUCH

Hardware Connection

  • Connect the development board to a computer using a USB cable.
  • app_main():
    • Initializes the display and touchscreen drivers.
    • Reads touchscreen data and displays it.

Operation Result

  • After successful flashing, the touchscreen works normally, and the corresponding touch UI elements are displayed on the screen.

08_DISPLAY_BMP

Hardware Connection

  • Connect the development board to a computer using a USB cable.
  • Insert a TF card containing BMP images.

Code Analysis

  • app_main():
    • Initializes the TF card and LCD.
    • Reads and displays BMP images.

Operation Result

  • After successful flashing, BMP images are displayed on the screen.


09_SPEAKER_MICROPHONE

Hardware Connection

  • Connect the development board to a computer using a USB cable.
  • Connect the speaker and microphone.

Code

Audio Touch Control Code

Code Analysis

  • touch_gt911_read_point(1): Reads touch point data from the GT911 touch controller (here, one set of data is taken).
  • point_data.cnt == 1: Only enters the processing logic for a single-touch event to avoid multi-touch interference.
  • prev_x / prev_y: Stores the previous touch coordinates to filter out repeated triggers.
  • Coordinate range check: When the touch point falls within (x: 390~420, y: 420~480), it is considered a tap on the control area on the interface.
  • play_or_pause(...): Executes play/pause control according to the current state (in the example, it is called twice in succession to demonstrate the control flow).
  • Paint_DrawCircle(...) / Paint_DrawString_EN(...): Draws the button and prompt text, and refreshes the display via waveshare_rgb_lcd_display(...).

Operation Result

  • After successful flashing, you can record audio via the microphone and play it back through the speaker.


10_LVGL_CODEC

Hardware Connection

  • Connect the development board to a computer using a USB cable.

Code

LVGL Codec Initialization Code

Code Analysis

  • speaker_codec_init(): Initializes the audio codec hardware.
  • speaker_codec_volume_set(50, NULL): Sets the volume to 50 (the exact range depends on the implementation).
  • speaker_player_register_callback(...): Registers a playback callback function to receive playback status events.
  • speaker_player_init(): Initializes the player module.
  • lvgl_port_lock(-1) / lvgl_port_unlock(): LVGL APIs are not thread-safe, so lock before calling UI functions and unlock afterward.
  • user_lv_demo_music(): Launches the example LVGL music interface.
  • IO_EXTENSION_Pwm_Output(100): Outputs PWM via the I/O expander to set the backlight brightness to maximum.
  • waveshare_rgb_lcd_bl_on(): Turns on the LCD backlight output.

Operation Result

  • After successful flashing, the LVGL interface is displayed on the screen, and music can be played normally (a TF card must be inserted in advance).




Using Factory Firmware

VERSION COMPATIBILITY NOTES

This firmware is used to demonstrate relevant features and will continue to be iterated upon. If you encounter any issues during use, please feel free to provide feedback. Once the issue is confirmed, the version will be updated.

This chapter includes the following sections:

Test Preparation

  • Type-C data cable
  • Card reader
  • TF card

Program Overview

The applications include: SquareLine example, handwriting test, image display, music player, AI conversation, settings (WLAN, sound adjustment, backlight adjustment, battery voltage and CPU temperature reading, isolated I/O test), and microphone test.

Program Usage

Below is a brief description of the purpose and functionality of each program.

PREPARATION

For the image display and music playback tests, you need to copy the two folders from ./firmware/sdcard to the TF card. The TF card's file system must be formatted as FAT32; otherwise, clicking the icon will restart the system.

Squareline

This example runs the SquareLine example interface.

Operation Result


DrawPanel

This example tests if the touchscreen is functioning properly.

Operation Result


MusicPlayer

This example plays music from the TF card. The volume can be adjusted using the speaker button on the right.

Operation Result


SpecAnalyzer

This example tests if the microphone is working properly by capturing sound and displaying it via animation.

Operation Result


Settings

This example is used to view and adjust system settings. Currently it includes entry points for WLAN, sound, backlight, battery information, and isolated I/O test.

Operation Result


WLAN

This example is used to connect to a Wi-Fi network. After entering the page, you can turn on the WLAN switch, scan for nearby hotspots, select the target network, and enter the password to complete the connection. Once connected, it can be used for subsequent network-related functional tests.

Operation Result


Isolationio

This example is used to test the isolated I/O function. Before use, connect the corresponding DI and DO pins, then toggle the DO state via the interface and observe whether the DI input changes as expected to confirm that the isolated input/output is working properly.

Operation Result


Factory Reset

If you have flashed other programs and cannot test the factory firmware, you can restore the factory settings using the method below:

  1. First, you need to understand how to use the Flash Tool. Refer to Firmware Flashing and Erasing Tutorial.

  2. Add ./firmware/ESP32-S3-Touch-LCD-7C-BOX-Test.bin to the Flash Tool with the flash address 0x00.

  3. Connect the development board to your computer, check the COM port in Device Manager, then select the corresponding COM port in the Flash Tool and click Start. Wait for the flashing to complete, then press the RESET button.


Resources

1. Hardware Resources

2. Technical Manuals

3. Example

4. Software Tools

5. Other Resource Links



Support

Monday-Friday (9:30-6:30) Saturday (9:30-5:30)

Email: services01@spotpear.com









[Tutorial Navigation]