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


SPI Communication Protocol:

Note: Unlike the traditional SPI protocol, because only display functionality is needed, the data line from the slave to the master is omitted
RESX is the Reset pin; it is pulled low during module power-up and is normally set to 1.
CSX is the slave chip select pin; the chip is enabled only when CS is low
D/CX is the data/command control pin of the chip. When DC = 0, commands are written; when DC = 1, data is written.
SDA is the data transmission pin, specifically for RGB data.
SCL is the SPI communication clock pin.
For SPI communication, data transmission follows a specific timing sequence, which are determined by the combination of clock phase (CPHA) and clock polarity (CPOL):
The level of CPHA determines whether data is captured on the first or second clock transition edge of the serial synchronous clock. When CPHA = 0, data is captured on the first transition edge;
The level of CPOL determines the idle level of the serial synchronous clock. CPOL = 0 means the idle state is low level.
As shown in the diagram, data transmission begins on the first falling edge of SCLK, with 8 bits of data transferred per clock cycle using SPI mode 0, transmitting bits from MSB to LSB
When using the reserved GPIO pads on the ESP32-S3-LCD-0.85 board, pay attention to the wiring and corresponding functions to avoid damaging the development board due to incorrect connections.


This chapter contains the following sections. Please read as needed:
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 Arduino IDE to download and install the Arduino IDE and add ESP32 support.
To run the demo, you need to install the corresponding library. You can click this link to download the demo package for the ESP32-S3-LCD-0.85 development board. The Arduino\libraries directory within this package contains all the necessary library files required for this tutorial.
| Library or File Name | Description | Version | Installation Method |
|---|---|---|---|
| lvgl | LVGL graphics library | v8.4.0 or v9.3.0 | Via Library Manager or manual install |
| GFX_Library_for_Arduino | GFX graphics library | v1.6.0 | Via Library Manager or manual install |
| U8g2 | Graphics display library | v2.35.30 | Via Library Manager or manual install |
| FastLED | RGB LED driver library | v3.10.1 | Via Library Manager or manual install |
| ESP32-audioI2S-master | Audio processing library | v3.4.0 | Via Library Manager or manual install |
| OneButton | Button library | v2.6.1 | Via Library Manager or manual install |
There are strong dependencies between versions of LVGL and its driver libraries. For example, a driver written for LVGL v8 may not be compatible with LVGL v9. To ensure that the examples can be reproduced reliably, it is recommended to use the specific versions listed in the table above. Mixing different versions of libraries may lead to compilation failures or runtime errors.
Installation Steps:
Unzip the downloaded demo package.
Copy all folders (ESP32-audioI2S-master, GFX_Library_for_Arduino, etc.) from its Arduino\libraries directory to the Arduino libraries folder.
The path to the Arduino libraries folder is typically: c:\Users\<username>\Documents\Arduino\libraries.
You can also locate it in the Arduino IDE by going to File > Preferences and checking the "Sketchbook location". The libraries folder is the libraries subfolder within this path.
For other installation methods, please refer to: Arduino Library Management Tutorial.
Installation Instructions for the ESP32-S3-Touch-LCD-1.54 Required Board
| Board Name | Installation Requirement | Version Requirement |
|---|---|---|
| ESP32 by Espressif Systems | "Install Offline" / "Install Online" | 3.2.0 |
For the ESP32-S3-LCD-0.85, you need to select and configure the board.

The printf() function can be used directly;
To use the Serial.println() function, additional configuration is required: enable the "USB CDC On Boot" option in the IDE's Tools menu, or declare an HWCDC object in your code to handle USB serial communication.
The Arduino demos are located in the Arduino/examples directory of the demo package.
| Demo | Basic Description | Dependency Library |
|---|---|---|
| 01_audio_out | Read audio files from TF card and play them | ESP32-audioI2S-master |
| 02_button_example Button test | OneButton | |
| 03_ws2812b_example | Test RGB LED | FastLED |
| 04_gfx_helloworld | Display HelloWorld on the screen | GFX_Library_for_Arduino |
| 05_esp_wifi_analyzer | Display WiFi signal strength on the screen | GFX_Library_for_Arduino |
| 06_gfx_u8g2_font | Display text in multiple languages by loading fonts | GFX_Library_for_Arduino, U8g2 |
| 07_sd_card_test | Test TF card read/write | --- |
| 08_lvgl_example_v8 | lvgl v8.4.0 demo | GFX_Library_for_Arduino, lvgl |
| 09_lvgl_example_v9 | lvgl v9.3.0 demo | GFX_Library_for_Arduino, lvgl |
This example demonstrates the ESP32-S3-LCD-0.85 reading an audio file from a TF card and playing it through the speaker. The screen shows no output. It supports formats like MP3, AAC, WAV, etc.
Initialize the TF card:
if (!SD_MMC.setPins(clk, cmd, d0, d1, d2, d3)) {
Serial.println("Pin change failed!");
return;
}
if (!SD_MMC.begin()) {
Serial.println("Card Mount Failed");
return;
}
Set I2S pins and volume:
audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT,I2S_MCLK);
audio.setVolume(21); // 0...21
Set the audio file to play:
audio.connecttoFS(SD_MMC, "music/1.mp3");
This demo demonstrates how to use the OneButton library to read button states such as single click, double click, and long press, and print them via the serial monitor.
Bind callback functions:
button1.attachClick(click1);
button1.attachDoubleClick(doubleclick1);
button1.attachLongPressStart(longPressStart1);
button1.attachLongPressStop(longPressStop1);
button1.attachDuringLongPress(longPress1);

This example uses the FastLED library to drive the ws2812b RGB LED on the ESP32-S3-LCD-0.85, changing to a random color every 500ms.
Initialize ws2812b and set brightness:
FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS); // GRB ordering is typical
FastLED.setBrightness(100); // 0-255

This demo demonstrates the ESP32-S3-LCD-0.85 using the GFX_Library_for_Arduino library to drive the screen and display "HelloWorld” on the screen.
Arduino_DataBus *bus = new Arduino_ESP32SPI(45 /* DC */, 21 /* CS */, 38 /* SCK */, 39 /* MOSI */, -1 /* MISO */);
Arduino_GFX *gfx = new Arduino_ST7789(
bus, 40 /* RST */, 0 /* rotation */, true, 240, 240);

This demo demonstrates the ESP32-S3-LCD-0.85 using a GFX_Library_for_Arduino library to display the signal strength of the WiFi band

This demo demonstrates how ESP32-S3-LCD-0.85 uses GFX_Library_for_Arduino libraries to load font libraries to display them in various languages

This demo tests the TF card read/write functionality on the ESP32-S3-LCD-0.85.
TF card initialization:
if (!SD_MMC.setPins(clk, cmd, d0, d1, d2, d3)) {
Serial.println("Pin change failed!");
return;
}
if (!SD_MMC.begin()) {
Serial.println("Card Mount Failed");
return;
}

This demo demonstrates how to run the lvgl demos (v8.4.0) on the ESP32-S3-LCD-0.85.


This demo demonstrates how to run the lvgl (v9.3.0) demos on the ESP32-S3-LCD-0.85.


This chapter contains 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.
For the ESP32-S3-LCD-0.85 development board, ESP-IDF version V5.5.0 or above is required.
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.
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 choose your desired version from the filter bar.

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 demos are located in the ESP-IDF directory of the demo package.
This example demonstrates a comprehensive demo for the ESP32-S3-LCD-0.85, and it is also the factory default flashed example.
![]() ![]() ![]() |
|---|
This example demonstrates how to use the espressif/button library to read button states such as single click, double click, and long press, and print them via serial port.
Bind callback functions:
ret = iot_button_register_cb(boot_btn, BUTTON_PRESS_DOWN, NULL, button_event_cb, NULL);
ret |= iot_button_register_cb(boot_btn, BUTTON_PRESS_UP, NULL, button_event_cb, NULL);
ret |= iot_button_register_cb(boot_btn, BUTTON_PRESS_REPEAT, NULL, button_event_cb, NULL);
ret |= iot_button_register_cb(boot_btn, BUTTON_PRESS_REPEAT_DONE, NULL, button_event_cb, NULL);
ret |= iot_button_register_cb(boot_btn, BUTTON_SINGLE_CLICK, NULL, button_event_cb, NULL);
ret |= iot_button_register_cb(boot_btn, BUTTON_DOUBLE_CLICK, NULL, button_event_cb, NULL);
ret |= iot_button_register_cb(boot_btn, BUTTON_LONG_PRESS_START, NULL, button_event_cb, NULL);
ret |= iot_button_register_cb(boot_btn, BUTTON_LONG_PRESS_HOLD, NULL, button_event_cb, NULL);
ret |= iot_button_register_cb(boot_btn, BUTTON_LONG_PRESS_UP, NULL, button_event_cb, NULL);
ret |= iot_button_register_cb(boot_btn, BUTTON_PRESS_END, NULL, button_event_cb, NULL);

This example demonstrates how to use the ESP32's RMT peripheral to control a WS2812 LED strip, achieving LED on/off control.
led_strip_config_t strip_config {
.strip_gpio_num = LED_STRIP_GPIO_PIN, // The GPIO that connected to the LED strip's data line
.max_leds = LED_STRIP_LED_COUNT, // The number of LEDs in the strip,
.led_model = LED_MODEL_WS2812, // LED strip model
.color_component_format = LED_STRIP_COLOR_COMPONENT_FMT_GRB, // The color order of the strip: GRB
.flags = {
.invert_out = false, // don't invert the output signal
}
while (1) {
if (led_on_off) {
/* Set the LED pixel using RGB from 0 (0%) to 255 (100%) for each color */
for (int i = 0; i < LED_STRIP_LED_COUNT; i++) {
ESP_ERROR_CHECK(led_strip_set_pixel(led_strip, i, 5, 5, 5));
}
/* Refresh the strip to send data */
ESP_ERROR_CHECK(led_strip_refresh(led_strip));
ESP_LOGI(TAG, "LED ON!");
}else{
ESP_ERROR_CHECK(led_strip_clear(led_strip));
ESP_LOGI(TAG, "LED OFF!");
}
led_on_off = !led_on_off;
vTaskDelay(pdMS_TO_TICKS(500));
}


This demo tests the TF card read/write functionality on the ESP32-S3-LCD-0.85.
Initialize and mount the TF card:
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
#if EXAMPLE_IS_UHS1
slot_config.flags |= SDMMC_SLOT_FLAG_UHS1;
#endif
// Set bus width to use:
#ifdef CONFIG_EXAMPLE_SDMMC_BUS_WIDTH_4
slot_config.width = 4;
#else
slot_config.width = 1;
#endif
// On chips where the GPIOs used for TF card can be configured, set them in
// the slot_config structure:
#ifdef CONFIG_SOC_SDMMC_USE_GPIO_MATRIX
slot_config.clk = CONFIG_EXAMPLE_PIN_CLK;
slot_config.cmd = CONFIG_EXAMPLE_PIN_CMD;
slot_config.d0 = CONFIG_EXAMPLE_PIN_D0;
#ifdef CONFIG_EXAMPLE_SDMMC_BUS_WIDTH_4
slot_config.d1 = CONFIG_EXAMPLE_PIN_D1;
slot_config.d2 = CONFIG_EXAMPLE_PIN_D2;
slot_config.d3 = CONFIG_EXAMPLE_PIN_D3;
#endif // CONFIG_EXAMPLE_SDMMC_BUS_WIDTH_4
#endif // CONFIG_SOC_SDMMC_USE_GPIO_MATRIX
// Enable internal pullups on enabled pins. The internal pullups
// are insufficient however, please make sure 10k external pullups are
// connected on the bus. This is for debug / example purpose only.
slot_config.flags |= SDMMC_SLOT_FLAG_INTERNAL_PULLUP;
ESP_LOGI(TAG, "Mounting filesystem");
ret = esp_vfs_fat_sdmmc_mount(mount_point, &host, &slot_config, &mount_config, &card);

This demo demonstrates how to run the lvgl demos (LVGL v8 and LVGL v9) on the ESP32-S3-LCD-0.85.
Initialize:
/* LCD HW initialization */
ESP_ERROR_CHECK(app_lcd_init());
/* Touch initialization */
app_touch_init();
/* LVGL initialization */
ESP_ERROR_CHECK(app_lvgl_init());


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:

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:

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