Google Chat:---
+86-0755-88291180
sales@spotpear.com
dragon_manager@163.com
tech-support@spotpear.com
zhoujie@spotpear.com
WhatsApp:13246739196
WhatsApp:13424403025



This section provides usage instructions for each functional example in the factory firmware, helping users understand the onboard resources and interface usage of the ESP32-C5-Touch-LCD-2.8. Before running the examples, please prepare the following components:
weather-wifi12345678
If the port is not recognized, please enter Boot mode:
After the download is complete, power cycle the board to run the program.
BAT_PWR button for about 2 seconds to power off. After power‑off, press the BAT_PWR button again to power on.Firmware directory of the example package.Supports Wi‑Fi scanning and provisioning. Click wifi config in the Wi‑Fi interface to scan a QR code for network provisioning.
Allows adjusting display brightness, viewing TF card size, and checking the MAC address in the product info section.



![]() ![]() |
|---|



06_wifi_weather as needed.
BOOT button to reset the ball's position.
Supports displaying JPG images at 240×320 resolution or lower.
Emulates a digital photo album interface. This APP requires a TF card. Copy the photo folder from the example program sdcard/ directory to the root of the TF card.

This chapter includes the following sections, please read as needed:
Before running the examples, please ensure the following conditions are met:
Arduino-v3.3.10. Please use an Arduino-ESP32 version that matches the example package.04_I2C_pcf85063, install the lib/SensorLib included in the example package. To run 06_lvgl_demo, install the lib/lvgl included in the example package.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.
Please refer to the tutorial Installing and Configuring the Arduino IDE to download and install the Arduino IDE.
Install the esp32 by Espressif Systems board support package in the Arduino IDE Board Manager.
The ESP32-C5-Touch-LCD-2.8 uses the ESP32-C5-WROOM-1-N32R8 MCU module, which is a v1.2 chip. Please use version v3.3.10 of the esp32 by Espressif Systems package.
If you use an older version of the ESP32 Arduino core, the board may not be correctly identified, causing serial download failures or preventing the program from being flashed.
ESP32-C5-Touch-LCD-2.8 Board Installation Requirements:
| Board Name | Board Installation Requirement | Version Requirement |
|---|---|---|
| ESP32 by Espressif Systems | "Offline Installation" / "Online Installation" | v3.3.10 |
After installation, select the appropriate ESP32-C5 board in Arduino IDE and select the USB serial port currently connected.
In the Arduino project settings for the ESP32-C5-Touch-LCD-2.8, select ESP32C5 Dev Module as the board.

The Arduino examples for this product minimize external library dependencies, primarily using the built-in capabilities of the Arduino ESP32 core and the source code provided within the example directories. The example package already includes the required libraries in the example/Arduino-v3.3.10/lib directory. You can copy them manually for offline installation, which is suitable for environments without internet access or where the Arduino Library Manager is inconvenient to use.
| Library or File | Purpose | Recommended Version / Source | Examples | Installation Method |
|---|---|---|---|---|
| Arduino ESP32 core | ESP32-C5 board support, download, and basic peripheral interfaces | v3.3.10 | All examples | Arduino IDE Board Manager |
lvgl | LVGL graphics framework | lib/lvgl in example package, LVGL v8.4.0 | 06_lvgl_demo | Offline copy to Arduino libraries directory |
SensorLib / SensorPCF85063.hpp | PCF85063 RTC driver | lib/SensorLib in example package, SensorLib v0.3.1 | 04_I2C_pcf85063 | Offline copy to Arduino libraries directory |
06_lvgl_demo is based on LVGL v8.4.0. Do not replace it with LVGL v9, as interfaces such as lv_disp_drv_t, lv_disp_draw_buf_t, lv_disp_drv_register(), and lv_indev_drv_t are not compatible.
Offline / Manual Installation:
Download and extract the product example program package. Subsequent library installation can be done offline without downloading third-party libraries from the Arduino Library Manager.
Locate the library directories in the example package:
example/Arduino-v3.3.10/lib/lvgl
example/Arduino-v3.3.10/lib/SensorLib
Copy the lvgl and SensorLib folders to your Arduino libraries directory.
The default libraries directory on Windows is usually:
C:\Users\<username>\Documents\Arduino\libraries
You can also check the Sketchbook location via File > Preferences in the Arduino IDE; the libraries folder under that path is the libraries directory.
Restart Arduino IDE after installation, then open the examples to compile.
Installation Verification:
lvgl and SensorLib directories can be seen under Documents\Arduino\libraries.Documents\Arduino\libraries\SensorLib\library.properties shows version=0.3.1.Documents\Arduino\libraries\lvgl\library.properties shows version=8.4.0.lv_conf.h file in the 06_lvgl_demo directory must remain in the example directory. Do not move it to the global Arduino libraries directory or delete it.lvgl or SensorLib simultaneously to avoid header file conflicts.04_I2C_pcf85063 fails with SensorPCF85063.hpp not found, confirm that lib/SensorLib from the example package has been copied to the Arduino libraries directory.esp32 by Espressif Systems v3.3.10.Tools > Board, select ESP32C5 Dev Module..ino file in example/Arduino-v3.3.10 to compile and flash.When using arduino-cli, refer to the following commands:
arduino-cli core install esp32:esp32@3.3.10
arduino-cli compile --fqbn esp32:esp32:esp32c5 example/Arduino-v3.3.10/06_lvgl_demo
The Arduino examples are located in the example/Arduino-v3.3.10 directory of the example package. Each example has been adapted to the actual hardware connections of the ESP32-C5-Touch-LCD-2.8.
| Feature | Device or Interface | Pins or Notes |
|---|---|---|
| LCD | ST7789, SPI, 240 x 320, RGB565 | SCLK GPIO6, MOSI GPIO7, DC GPIO9, CS GPIO10 |
| LCD Reset | CH32V003 I/O Expander | EXIO1 |
| LCD Backlight | CH32V003 PWM | CH32 PWM |
| Touch | CST3530, I2C | SDA GPIO0, SCL GPIO1, INT GPIO5 |
| Touch Reset | CH32V003 I/O Expander | EXIO0 |
| I/O Expander | CH32V003, I2C address 0x24 | SDA GPIO0, SCL GPIO1 |
| 6‑axis IMU | QMI8658, I2C address 0x6B | SDA GPIO0, SCL GPIO1 |
| RTC | PCF85063, I2C address 0x51 | SDA GPIO0, SCL GPIO1 |
| Temp/Humidity Sensor | SHTC3, I2C address 0x70 | SDA GPIO0, SCL GPIO1 |
| TF | SDSPI | SCLK GPIO6, MOSI GPIO7, MISO GPIO8, CS GPIO23 |
Display, touch, backlight, reset, and sensor pins have already been adapted to the product hardware connections in the examples. For routine secondary development, we recommend focusing on application‑layer and UI logic modifications. Do not change the underlying pin definitions unless you are porting the code to a different board or modifying the hardware connections.
| Example Directory | Basic Description | Main Test Content |
|---|---|---|
| 01_exio | Tests the onboard CH32V003 I/O expander, toggles EXIO0~EXIO7 output levels cyclically | I/O expansion, I2C bus |
| 02_I2C_qmi8658 | Reads QMI8658 6‑axis sensor data and outputs accelerometer and gyroscope data over serial | IMU, I2C bus |
| 03_SD_Card | Mounts a TF card via SDSPI, prints TF card info and capacity, and provides file read/write interfaces | TF, SDSPI |
| 04_I2C_pcf85063 | Initializes the PCF85063 RTC, sets a test time, and periodically prints RTC time over serial | RTC, I2C bus |
| 05_shtc3 | Reads SHTC3 temperature and humidity sensor ID, temperature, and humidity, and outputs over serial | Temp/Humidity sensor, CRC check |
| 06_lvgl_demo | Displays a touch example UI using ST7789, CST3530, and LVGL v8.4.0 | LCD, backlight, touch, LVGL |
The current Arduino examples directory contains the following projects:
example/Arduino-v3.3.10
|-- 01_exio
|-- 02_I2C_qmi8658
|-- 03_SD_Card
|-- 04_I2C_pcf85063
|-- 05_shtc3
|-- 06_lvgl_demo
`-- lib
|-- SensorLib
`-- lvgl
Each subdirectory is an independent Arduino example. To open an example, open the .ino file inside that directory, for example:
example/Arduino-v3.3.10/01_exio/01_exio.ino
lib/SensorLib is the RTC driver library used by 04_I2C_pcf85063 (SensorLib v0.3.1). lib/lvgl is the LVGL v8.4.0 library used by 06_lvgl_demo. Before compiling 04_I2C_pcf85063, you need to copy SensorLib at minimum. Before compiling 06_lvgl_demo, you need to copy lvgl at minimum.
It is recommended to run the examples in the following order:
01_exio
-> 02_I2C_qmi8658
-> 03_SD_Card
-> 04_I2C_pcf85063
-> 05_shtc3
-> 06_lvgl_demo
01_exio to verify the CH32V003 I/O expander and I2C bus. LCD reset, touch reset, and backlight are all related to CH32V003, so confirm this example works first.02_I2C_qmi8658 to verify 6‑axis sensor data reading.03_SD_Card to verify the TF card and SDSPI.04_I2C_pcf85063 to verify RTC time setting and reading.05_shtc3 to verify SHTC3 temperature/humidity reading and CRC checking.06_lvgl_demo to verify LCD, backlight, touch, and LVGL all together.example/Arduino-v3.3.10. Do not mix it with the ESP‑IDF example directory.SDA GPIO0, SCL GPIO1. CH32V003, QMI8658, PCF85063, SHTC3, and CST3530 are all on this I2C bus.03_SD_Card.04_I2C_pcf85063 writes a fixed test time on every power‑up by default. To enable continuous RTC time‑keeping, comment out i2c_rtc_setTime().06_lvgl_demo has already been adapted for ST7789 display and CST3530 touch. No additional GFX display library or third‑party touch library is required.LCD_RST = CH32 EXIO1, TP_RST = CH32 EXIO0.Function Description
This example verifies communication with the onboard CH32V003 I/O expander. CH32V003 communicates with the ESP32‑C5 via I2C at address 0x24. The example configures EXIO0~EXIO7 as outputs and toggles them every second.
CH32V003 is pre‑programmed with firmware at the factory; no separate CH32 firmware flashing is required.
Code Entry
01_exio/01_exio.ino
01_exio/io_extension.cpp
01_exio/io_extension.h
Recommended key code sections:
| Code | Purpose |
|---|---|
Wire.begin(I2C_SDA, I2C_SCL) | Initializes I2C with SDA GPIO0, SCL GPIO1 |
IO_EXTENSION_ADDR | CH32V003 I2C, default 0x24 |
IO_EXTENSION_Init(Wire) | Initializes the I/O expander |
IO_EXTENSION_IO_Mode(0xFF) | Configures EXIO0~EXIO7 as outputs |
IO_EXTENSION_Output() | Sets the output level of a specified EXIO pin |
Expected Behavior

Troubleshooting
| Symptom | Possible Cause | Action |
|---|---|---|
Serial shows IO extension not found at 0x24 | I2C communication failure | Confirm SDA GPIO0, SCL GPIO1 and ensure the board is powered |
| LCD or touch malfunctions later | CH32V003 not communicating | First ensure 01_exio works, then debug display and touch |
| Need to re‑flash CH32V003 firmware | Not required | CH32V003 is pre‑programmed at the factory; no action needed for normal use |
Function Description
This example reads the onboard QMI8658 6‑axis sensor. After initializing I2C, the program creates a qmi8658c_example task that reads accelerometer and gyroscope data every second and outputs it over serial.
Code Entry
02_I2C_qmi8658/02_I2C_qmi8658.ino
02_I2C_qmi8658/i2c_bsp.cpp
02_I2C_qmi8658/qmi8658c.cpp
Recommended key code sections:
| Code | Purpose |
|---|---|
I2C_master_Init() | Initializes I2C with SDA GPIO0, SCL GPIO1, 400 kHz |
QMI8658_SLAVE_ADDR_H | QMI8658 I2C address, default 0x6B |
qmi8658_init() | Initializes QMI8658 |
qmi8658_read_xyz() | Reads accelerometer and gyroscope data |
Expected Behavior

Troubleshooting
| Symptom | Possible Cause | Action |
|---|---|---|
Serial shows qmi8658_init fail | QMI8658 I2C communication failure | Confirm I2C pins are GPIO0/GPIO1; run 01_exio or 05_shtc3 first to verify I2C |
| Data remains unchanged | Board is stationary or task not running | Gently rotate the board and confirm the serial baud rate is 115200 |
| Compilation errors related to I2C interfaces | Arduino ESP32 core version mismatch | Use esp32 by Espressif Systems v3.3.10 |
Function Description
This example verifies the TF card interface. It uses SDSPI mode to mount the TF card at /sd_card by default, and prints TF card information and capacity upon success.
Code Entry
03_SD_Card/03_SD_Card.ino
03_SD_Card/sd_card_bsp.cpp
03_SD_Card/sd_card_bsp.h
Recommended key code sections:
| Code | Purpose |
|---|---|
PIN_NUM_CLK | TF SCLK, GPIO6 |
PIN_NUM_MOSI | TF MOSI, GPIO7 |
PIN_NUM_MISO | TF MISO, GPIO8 |
PIN_NUM_CS | TF CS, GPIO23 |
SD_card_Init() | Initializes SPI bus and mounts TF card |
s_example_write_file() / s_example_read_file() | Example file write/read interfaces |
Expected Behavior
Troubleshooting
| Symptom | Possible Cause | Action |
|---|---|---|
| TF card mount fails | No card inserted, invalid format, or poor contact | Use a FAT/FAT32 TF card, re‑insert, and retest |
| Compilation errors related to SDMMC/SDSPI interfaces | Arduino ESP32 core version mismatch | Use v3.3.10 |
| File read/write fails | Mount failure or incorrect path | Confirm SD_card_Init() prints card info successfully |
Function Description
This example verifies the onboard PCF85063 RTC. The program initializes the RTC and calls the following in setup():
i2c_rtc_setTime(2025, 9, 9, 14, 51, 30);
It then creates an i2c_rtc_loop_task task that reads and prints RTC time every second.
Code Entry
04_I2C_pcf85063/04_I2C_pcf85063.ino
04_I2C_pcf85063/rtc_bsp.cpp
04_I2C_pcf85063/rtc_bsp.h
Recommended key code sections:
| Code | Purpose |
|---|---|
rtc.begin(Wire, SENSOR_SDA, SENSOR_SCL) | Initializes PCF85063 with SDA GPIO0, SCL GPIO1 |
i2c_rtc_setTime() | Sets RTC time |
i2c_rtc_get() | Reads RTC time structure |
i2c_rtc_loop_task() | Periodically reads and prints RTC time over serial |
Expected Behavior
Since the example writes a fixed test time on every power‑up, if you want to verify continuous RTC time‑keeping, comment out or delete i2c_rtc_setTime().
Troubleshooting
| Symptom | Possible Cause | Action |
|---|---|---|
Compilation fails with SensorPCF85063.hpp not found | Missing SensorLib dependency | Copy example/Arduino-v3.3.10/lib/SensorLib to Arduino libraries directory |
Serial shows Failed to find PCF85063 | RTC I2C communication failure | Confirm I2C pins are GPIO0/GPIO1; test other I2C examples first |
| Time always resets to fixed value on power‑up | Example actively writes test time | Comment out or delete i2c_rtc_setTime() and retest |
Function Description
This example reads the onboard SHTC3 temperature and humidity sensor. The program uses Wire to send SHTC3 commands, wakes the sensor, reads its ID, performs a soft reset, and reads temperature and humidity every second in loop().
CRC checking is implemented to prevent invalid data from being treated as normal temperature/humidity readings.
Code Entry
05_shtc3/05_shtc3.ino
Recommended key code sections:
| Code | Purpose |
|---|---|
SHTC3_ADDR | SHTC3 I2C address, default 0x70 |
SHTC3_CMD_READ_ID | Reads sensor ID |
SHTC3_CMD_MEASURE_T_RH | Triggers temperature/humidity measurement |
shtc3Crc() | CRC check for SHTC3 data |
readShtc3() | Reads and converts temperature and humidity |
Expected Behavior

Troubleshooting
| Symptom | Possible Cause | Action |
|---|---|---|
Serial shows SHTC3 not found | I2C communication failure | Confirm I2C pins are GPIO0/GPIO1 and ensure the board is powered |
Serial shows Failed to read SHTC3 | CRC failure or sensor not responding | Keep power stable, power cycle, and retest |
| Occasional abnormal temperature/humidity values | Invalid I2C data | The example includes CRC checking; use data that passes the check |
Function Description
This example verifies LCD display, backlight, touch, and LVGL basic UI. It does not depend on the GFX display library. The LCD driver is adapted from the ST7789 example into Display_ST7789, the touch driver is adapted from the CST3530 example into Touch_CST3530, and CH32V003 I/O expansion, LCD reset, touch reset, and backlight control are consolidated in Board_IO.
The UI displays the board name, display status, touch status, touch coordinates, and backlight brightness.
Code Entry
06_lvgl_demo/06_lvgl_demo.ino
06_lvgl_demo/Board_IO.cpp
06_lvgl_demo/Board_IO.h
06_lvgl_demo/Display_ST7789.cpp
06_lvgl_demo/Display_ST7789.h
06_lvgl_demo/Touch_CST3530.cpp
06_lvgl_demo/Touch_CST3530.h
06_lvgl_demo/lv_conf.h
Recommended key code sections:
| Code | Purpose |
|---|---|
LCD_WIDTH / LCD_HEIGHT | LCD resolution, 240 x 320 |
EXAMPLE_PIN_NUM_SCLK / EXAMPLE_PIN_NUM_MOSI | LCD SPI pins, GPIO6/GPIO7 |
EXAMPLE_PIN_NUM_LCD_DC / EXAMPLE_PIN_NUM_LCD_CS | LCD DC/CS pins, GPIO9/GPIO10 |
BOARD_LCD_RST_EXIO | LCD reset, CH32V003 EXIO1 |
BOARD_TP_RST_EXIO | Touch reset, CH32V003 EXIO0 |
CST3530_ADDR | CST3530 I2C address, default 0x58 |
LCD_Init() | Initializes SPI bus and ST7789 panel |
TOUCH2_Init() | Initializes CST3530 touch |
create_demo_ui() | Creates LVGL example UI |
Expected Behavior
The LCD displays the ESP32-C5 Touch LCD 2.8 example UI. When you touch the screen, the UI updates with touch coordinates. Dragging the progress bar at the bottom adjusts backlight brightness. Serial output shows:
ESP32-C5-Touch-LCD-2.8 Arduino LVGL demo
Touch controller CST3530 initialized
LVGL demo started
If touch is not recognized, the UI displays Touch: not found.

Troubleshooting
| Symptom | Possible Cause | Action |
|---|---|---|
Compilation fails with lvgl.h not found | LVGL not installed from example package | Copy example/Arduino-v3.3.10/lib/lvgl to Arduino libraries directory |
Compilation errors related to lv_disp_drv_t / lv_indev_drv_t | LVGL v9 used | Remove the incorrect version and use LVGL v8.4.0 from the example package |
| Screen does not light up | CH32V003, LCD reset, backlight, or ST7789 initialization failure | Run 01_exio first to confirm CH32V003 is working; then restore original pin configuration in 06_lvgl_demo |
| Touch does not respond | CST3530 not detected or touch reset issue | Confirm I2C uses GPIO0/GPIO1, touch interrupt is GPIO5, and touch reset is CH32 EXIO0 |
| Display colors are incorrect | RGB565 byte order or color depth modified | Confirm lv_conf.h uses LV_COLOR_DEPTH 16 and keep the LV_COLOR_16_SWAP configuration from the example |
XiaozhiAI (XiaoZhi AI) is an open-source AI voice chatbot project based on the ESP32 development board, aiming to bring the general intelligence of large language models (LLMs) to edge devices. It provides a software-hardware integrated solution supporting full-duplex voice conversations and IoT device control, dedicated to assisting developers in building highly customized physical AI agents quickly and at low cost.
This article demonstrates how to flash firmware for Waveshare ESP32 development boards that support XiaoZhi AI, covering two methods: flashing without a development environment (directly flashing precompiled firmware) and flashing with a development environment (compiling from source and flashing).
This section uses the ESP32-S3-Touch-AMOLED-1.8 development board as an example. The steps are similar for other development boards.
Please first confirm that your hardware is listed in the XiaoZhi AI Supported Products List.

Visit the XiaoZhi GitHub to download the firmware file for your device. Click Assets to expand the full file list:

Refer to the Flash Firmware Flashing and Erasing Tutorial to complete the firmware flashing.
This repository aggregates firmware for Waveshare ESP32 development boards that support XiaoZhi AI. All firmware has been tested and verified on the corresponding boards, making it convenient for users to find and download. Firmware versions may be updated slightly later than the official XiaoZhi repository.
Visit the Waveshare GitHub repository and download the appropriate firmware version for your needs:

Refer to the Flash Firmware Flashing and Erasing Tutorial to complete the firmware flashing.
Visit the XiaoZhi AI Chatbot repository to download the complete project code:

Refer to the ESP-IDF Environment Setup Tutorial to configure the development environment.
Click to select the target device. Choose the chip model corresponding to your development board (e.g.,
esp32s3):

When setting the target device, ESP-IDF will automatically configure the corresponding toolchain and libraries. This process may take some time, please be patient. For more details, please refer to the Official Documentation.
Click to open the ESP-IDF terminal, then execute the command
idf.py menuconfig to enter the configuration interface. Select Xiaozhi Assistant:

Select Board Type to choose the development board type:

Choose the product model corresponding to your development board:

Choose XiaoZhi-AI default display language:


Press the S key to save the configuration and exit. Then click the to automatically complete compilation, flashing, and serial monitoring.
Connect your phone or computer to the device's Wi-Fi hotspot: Xiaozhi-xxxxxx. After successful connection, the configuration page should automatically pop up. If not, manually open a browser and visit http://192.168.4.1.
On the network configuration page, select the Wi-Fi name you want to connect to (only 2.4G band is supported; to connect to an iPhone hotspot, enable Max Compatibility in your phone's system settings). The SSID will be auto-filled. Enter the password and click Connect to start connecting:

Ensure the device has successfully connected to the Internet. The device will then broadcast a 6-digit device verification code (you can wake the device again to replay the code).
Visit the XiaoZhi AI Console. If you haven't registered, complete the registration and log in:



Enter the 6-digit verification code. The device will automatically activate and appear on the Device Management page, ready for normal use.
Say the wake word "Hello XiaoZhi" to wake the device and start voice conversations.
ESP32-S3-Touch-AMOLED-1.8 Button Instructions:

This chapter includes the following sections, please read as needed:
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.
Please refer to Install ESP-IDF Development Environment.
The ESP32-C5-Touch-LCD-2.8 examples require ESP-IDF v5.5.4.
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.
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.
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.
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.

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

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

Download and install Visual Studio Code.
During installation, it is recommended to check Add "Open with Code" action to Windows Explorer file context menu to facilitate opening project folders quickly.
In VS Code, click the Extensions icon in the Activity Bar on the side (or use the shortcut Ctrl + Shift + X) to open the Extensions view.
Enter ESP-IDF in the search box, locate the ESP-IDF extension, and click Install.

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.
The ESP-IDF examples are located in the example/ESP-IDF-V554 directory of the example package. Each example project has been adapted to the onboard hardware resources of the ESP32-C5-Touch-LCD-2.8 and can be used to verify display, touch, audio, TF card, Wi‑Fi, sensors, and GUI functionality.
Navigate to any ESP-IDF example directory and run:
cd example/ESP-IDF-V554/02_2048
idf.py build flash monitor
If you need to specify a serial port, replace COMx with the actual port, for example COM5:
idf.py -p COMx build flash monitor
| Example Directory | Description |
|---|---|
01_ch32_test | CH32V003 I/O expander test, verifies output toggling and input reading |
02_2048 | 2048 game based on LVGL v9, supports touch interaction, score tracking, and game result prompts |
03_sd_lvgl | Mounts a TF card, reads the Test.txt file from the root directory, and displays the content on the LCD |
04_sd_music | Scans MP3 files from the /sdcard/music directory on the TF card and automatically plays the first one |
05_spiff_music | Reads MP3 files from the SPIFFS /music directory and implements a music player with an LVGL interface |
06_wifi_weather | Connects to a specified Wi‑Fi network, retrieves real‑time weather data for Shenzhen, and displays it on the screen |
07_Ball_qmi | Reads QMI8658 accelerometer data and implements a gravity ball that moves with the board's tilt |
08_bookesia | Implements a touch drawing board application using the ESP‑Brookesia framework, with a status bar and memory info |
01_ch32_test tests the onboard CH32V003 I/O expander. CH32V003 is pre‑programmed at the factory and does not require separate CH32 firmware flashing. Running this ESP32-C5 example is sufficient to verify I/O expander communication and control.02_2048 is generated with GUI Guider. The layout is mainly in components/generated/setup_scr_Game2048.c, event functions are in components/generated/events_init.c, and custom initialization and extension logic are in components/custom/custom.c.03_sd_lvgl, place a Test.txt file in the root directory of the TF card.04_sd_music, create a music folder in the root directory of the TF card and place .mp3 files inside.05_spiff_music uses MP3 files stored in SPIFFS and is suitable for implementing a music player with an LVGL interface.06_wifi_weather connects to the weather-wifi hotspot by default, password 12345678, supporting both 2.4 GHz and 5 GHz bands. To change the hotspot or city, adjust the corresponding configuration in the example source code.07_Ball_qmi, keep the board flat and stationary during calibration to avoid noticeable ball drift.08_bookesia uses the ESP‑Brookesia framework and serves as a reference for secondary development involving touch GUI, multi‑app interfaces, and drawing board functionality.IO_EXP_PIN_0 through IO_EXP_PIN_7 as outputs and toggles them high/low cyclically, then switches to input mode and reads the input states.IO_EXP_PIN_0~7.
main.c in the project calls setup_ui(), custom_init() and events_init() in sequence to create the UI, perform custom initialization, and bind events.components/generated/setup_scr_Game2048.c for the 2048 page layout, components/generated/events_init.c for touch and button event logic, and components/custom/custom.c for custom initialization and business extension logic.
Test.txt file from the root directory of the TF card and displays its content on the LCD.Test.txt file in the root directory of the TF card.Waiting for SD card....Test.txt.SD card not detected!.
.mp3 files in the /sdcard/music directory.music folder in the root directory of the TF card and place .mp3 audio files inside.
.mp3 files in the /spiffs/music directory.music directory.
| Item | Default Value |
|---|---|
| Wi-Fi SSID | weather-wifi |
| Wi-Fi Password | 12345678 |
| Wi-Fi Band | 2.4 GHz or 5 GHz |
| Weather City | Shenzhen |
| Request Server | cn.apihz.cn |



Development Board Design Files
ESP32-C5 Chip Official Manuals
Onboard Component Datasheets
Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Email: services01@spotpear.com