• sales

    +86-0755-88291180

ESP32-S3-LCD-1.54 User Guide

Features

  • Equipped with the high-performance ESP32-S3R8 featuring an Xtensa® 32-bit LX7 dual-core processor with a clock frequency up to 240 MHz
  • Supports 2.4 GHz Wi-Fi (802.11 b/g/n) and Bluetooth® 5 (LE) with an integrated onboard antenna
  • Built-in 512KB SRAM and 384KB ROM, with stacked 8MB PSRAM and external 16MB Flash storage
  • Features a Type-C interface, eliminating the hassle of plug orientation and enhancing user convenience and device compatibility
  • Onboard 1.54inch capacitive LCD screen, 240 × 240 resolution, 262K colors, capable of displaying color images clearly
  • Onboard ES7210 audio codec chip, supporting dual-microphone audio capture and echo cancellation
  • Onboard ES8311 audio codec chip, NS4150B power amplifier chip, microphone, and speaker
  • Onboard QMI8658 6-axis IMU (3-axis accelerometer and 3-axis gyroscope) for detecting motion and posture in expanded applications
  • Built-in ST7789 driver IC, communicating via SPI interface
  • Built-in CST816 capacitive touch controller, communicating via I2C interface (touch version only)
  • Onboard PLUS and BOOT buttons, both customizable for function development
  • Onboard 3.7V 1.2mm lithium battery charging/discharging interface
  • Exposes 1-ch I2C, 1-ch USB and 1-ch UART pads for external devices connection and debugging, enabling flexible peripheral configuration
  • Onboard TF card slot supporting storage expansion and high-speed data transfer, facilitating functions like data logging and media playback while simplifying circuit design

Onboard Resources

  1. ESP32-S3R8 High-performance Xtensa® 32-bit LX7 dual-core processor, up to 240 MHz
  2. 16MB NOR-Flash
  3. NS4150B Audio power amplifier chip
  4. ES8311 Low-power audio codec chip
  5. ES7210 ADC chip for echo cancellation circuitry
  6. Battery charge/discharge management chip
  7. QMI8658 6-axis IMU includes a 3-axis gyroscope and a 3-axis accelerometer
  8. PLUS Button User-defined button
  9. PWR button
  10. BOOT Button Used for device startup and functional debugging
  11. Microphone Microphone input and echo cancellation
  12. TF Card Slot
  13. Onboard Chip Antenna Supports 2.4GHz Wi-Fi (802.11 b/g/n) and Bluetooth 5 (LE)
  14. MX1.25 Lithium Battery Header MX1.25 2PIN connector for connecting a 3.7V lithium battery, supports charging and discharging
  15. Type-C Port
  16. MX1.25 Speaker Header Non-polarized
  17. 1.54inch Display Panel Connector

LCD and Its Controller

  • The LCD uses the built-in controller ST7789, a 240 × RGB × 320 pixel LCD controller. Since the LCD itself has a resolution of 240(H) × RGB × 240(V), the internal RAM of the LCD is not fully utilized.
  • The LCD supports input color formats of 12-bit, 16-bit, and 18-bit per pixel, i.e., RGB444, RGB565, and RGB666. The examples use the RGB565 color format, which is also the most common RGB format.
  • The LCD uses a 4-wire SPI communication interface, significantly saving GPIO pins while maintaining relatively fast communication speeds.

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

Pinout Definition

When using the reserved GPIO terminals on the board, pay attention to the wiring colors and corresponding functions to avoid damaging the development board due to incorrect wiring habits.

Dimensions


User Guide

To help users quickly understand the various functions of the product, we provide a series of test examples to familiarize customers with the use of each interface. Besides the ESP32-S3-Touch-LCD-1.54 host and its accompanying components, the following items are required to run the examples:

Component Preparation

  • ESP32-S3-Touch-LCD-1.54 ×1
  • TF card ×1 (not required, needed only for TF card examples)

Assembly Guide

WARNING

When installing the battery, assemble the PC insulating sheet. It provides insulation and flame retardancy to isolate the battery from the PCB board.

Precautions

⚠️ USB Download Precautions (Important)

PROGRAMMING THE DEVELOPMENT BOARD VIA USB

If the port is not recognized, please enter Boot mode:

  1. Press and hold the BOOT button
  2. Connect the USB cable to the computer
  3. Release the BOOT button

After the download is complete, restart the board to run the program.

Firmware Download

  • The example programs are located in the Firmware directory of the demo package.

Firmware Flashing

  • Unzip the software resource package (Flash_download_tool)
  • Open the flash_download_tool_3.9.7.exe software. Select ESP32-S3 and USB based on the development board's MCU and interface.
  • Parameter Settings
    • ①. Select the COM port corresponding to the development board
    • ②. Select the highest baud rate, 1152000
    • ③. Click "..." to select the bin file from the ESP32-S3-LCD-1.54-Demo\Firmware or ESP32-S3-Touch-LCD-1.54-Demo\Firmware directory provided in the example package. Manually enter the download address "0x00", and check the box on the far left
    • ④. Start flashing
  • Flashing complete (the flashing process takes some time, please be patient)
  • Press the reset button and observe the result
WARNING

If it remains in the "Waiting for power-on sync" state, hold the "Boot" button and power cycle the device to enter download mode; this will resolve the issue.

Example Introduction

  • The firmware uses the Brookesia component, showcasing various applications in an APP style, including Settings, Photo Album, Music Player, Video Player, Recording, Squareline, Xiaozhi AI, Gravity Ball, etc. (Supported only by the touch version).

App Example Introduction

TIP
  • To exit an app, swipe up from the bottom of the screen
  • Swipe up from the bottom and pause in the middle of the screen to view recently used apps. Swipe up again on an app preview to close it

Settings App

  • Features Wi-Fi scanning and network configuration. Click WIFI on the interface, then wifi config to scan a QR code for network configuration

  • Allows adjustment of display brightness and volume

  • Displays the battery ADC voltage

  • Product information screen where you can view the MAC address

Photo Album APP

  • Supports JPG image display. Support for more image formats is currently being adapted

  • Simulates the interface of a digital photo album. This APP requires a TF card to be inserted with JPG image files placed in the photo directory to run correctly

Music APP

  • Simulates a music player interface. This app requires an inserted memory card with MP3 files placed in the music directory to function correctly

Video APP

  • Simulates the interface of a video player. This APP requires a TF card to be inserted with MP4 files placed in the video directory to run correctly

E-Book APP

  • Simulates the interface of an e-book reader. This APP requires a TF card to be inserted with TXT files placed in the fiction directory to run correctly

Recorder APP

  • This demo allows testing dual-microphone recording. Click the start button to begin recording, click again to stop recording. The app will then automatically play back the recorded audio

  • The recorded audio file is saved in the root directory of the memory card

Squareline

  • This example demonstrates an LVGL demo created with SquareLine Studio

Gravity Ball

  • This example demonstrates a Gravity Ball application based on the 6-axis inertial sensor. The ball moves in real-time on the screen as the device is tilted, following its orientation

XiaoZhi AI APP

  • Click the APP icon to enter the Xiaozhi AI application. It is consistent with the version adapted for the Xiaozhi official website, and the operation method is the same. Double-click the Boot button to return to the Brookesia interface


XiaoZhi AI Application Tutorial

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).

0. Firmware Flashing Process Reference

INFO

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.

XiaozhiAI-Process

1. Flashing Without a Development Environment

1.1 Download Firmware from XiaoZhi Official GitHub

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

    xiaozhi-GitHub

  2. Refer to the Flash Firmware Flashing and Erasing Tutorial to complete the firmware flashing.

1.2 Download Firmware from Waveshare GitHub

INFO

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.

  1. Visit the Waveshare GitHub repository and download the appropriate firmware version for your needs:

    xiaozhi-GitHub

  2. Refer to the Flash Firmware Flashing and Erasing Tutorial to complete the firmware flashing.

2. Flashing with ESP-IDF Environment

2.1 Download the Project from XiaoZhi GitHub

Visit the XiaoZhi AI Chatbot repository to download the complete project code:

Chatbot

2.2 Environment Setup

Refer to the ESP-IDF Environment Setup Tutorial to configure the development environment.

2.3 Configuration and Compilation

  1. Click VSCode Select Target Device Icon to select the target device. Choose the chip model corresponding to your development board (e.g., esp32s3):

    VS Code Select Device Chip Option

    TIP

    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.

  2. Click VSCode Terminal Button to open the ESP-IDF terminal, then execute the command idf.py menuconfig to enter the configuration interface. Select Xiaozhi Assistant:

    Enter Terminal Configuration Interface

  3. Select Board Type to choose the development board type:

    Select Board Type

  4. Choose the product model corresponding to your development board:

    Select Product Model

  5. Press the S key to save the configuration and exit. Then click the One-click Build, Flash, and Monitor Icon to automatically complete compilation, flashing, and serial monitoring.

2.4 Start Network Provisioning

  1. 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.

  2. 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:

    Connect to Wi-Fi

2.5 Add a New Device to the Management Console

  1. 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).

  2. Visit the XiaoZhi AI Console. If you haven't registered, complete the registration and log in:

    Console Interface

    Login Interface

    Add Device

  3. Enter the 6-digit verification code. The device will automatically activate and appear on the Device Management page, ready for normal use.

  4. Say the wake word "Hello XiaoZhi" to wake the device and start voice conversations.

  5. ESP32-S3-Touch-AMOLED-1.8 Button Instructions:

    • BOOT button: Press to wake XiaoZhi
    • PWR button: Short press to power on; long press for more than 6 seconds to power off

    Device Added Successfully

3. XiaoZhi Resources


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 Development Environment

1. Installing and Configuring Arduino IDE

Please refer to the tutorial Installing and Configuring Arduino IDE to download and install the Arduino IDE and add ESP32 support.

2. Installing Libraries

To run the demo, you need to install the corresponding library. The example code uses the GFX Library for Arduino library to drive the ST7789 display and the SensorLib library to drive the CST816 touch controller.

You can click this link to download the demo package for the ESP32-S3-Touch-LCD-1.54 development board. The Arduino\libraries directory within this package contains all the necessary library files required for this tutorial.

Library or File NameDescriptionVersionInstallation Method
lvglLVGL graphics libraryv8.4.0 or v9.3.0Via Library Manager or manual install
GFX_Library_for_ArduinoGFX graphics libraryv1.6.0Via Library Manager or manual install
U8g2Graphics display libraryv2.35.30Via Library Manager or manual install
SensorLibSensor driver libraryv0.3.1Via Library Manager or manual install
ESP32-audioI2S-masterAudio processing libraryv3.4.0Via Library Manager or manual install
OneButtonButton libraryv2.6.1Via Library Manager or manual install
VERSION COMPATIBILITY NOTES

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:

  1. Unzip the downloaded demo package.

  2. Copy all folders (ESP32-audioI2S-master, GFX_Library_for_Arduino, etc.) from its Arduino\libraries directory to the Arduino libraries folder.

    INFO

    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.

  3. For other installation methods, please refer to: Arduino Library Management Tutorial.

ESP32-S3-Touch-LCD-1.54 Board Installation Instructions

Board NameInstallation RequirementVersion Requirement
ESP32 by Espressif Systems"Install Offline" / "Install Online”3.2.0

3. Other Tips

You need to select and configure the development board for ESP32-S3-Touch-LCD-1.54.

  1. The ESP32-S3-Touch-LCD-1.54 requires selecting ESP32S3 Dev Module

  2. Select the USB port

  3. The ESP32-S3-Touch-LCD-1.54 uses the ESP32-S3 native USB interface, not UART-to-USB. For serial communication:

    • 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.

  4. Select 16MB Flash

  5. Select a Partition Table of the appropriate size

Demo

The Arduino demos are located in the Arduino/examples directory of the demo package.

DemoBasic DescriptionDependency Library
01_audio_outRead audio files from TF card and play themESP32-audioI2S-master
02_button_exampleButton testOneButton
03_qmi8658_examplePrints data obtained from the IMUSensorLib FastLED
04_gfx_helloworldDisplay HelloWorld on the screenGFX_Library_for_Arduino
05_esp_wifi_analyzerDisplay WiFi signal strength on the screenGFX_Library_for_Arduino
06_gfx_u8g2_fontDisplay text in multiple languages by loading fontsGFX_Library_for_Arduino, U8g2
07_sd_card_testTest TF card read/write---
08_lvgl_example_v8lvgl v8.4.0 demoGFX_Library_for_Arduino, lvgl
09_lvgl_example_v9lvgl v9.3.0 demoGFX_Library_for_Arduino, lvgl
10_esp_srTests voice wake-up and recognition---

01_audio_out

This demo demonstrates the ESP32-S3-Touch-LCD-1.54 reading an audio file from the TF card and playing it through the speaker. The screen remains blank. It supports formats like MP3, AAC, and WAV.

Code

01_audio_out.ino

Code Analysis

  • 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");

Operation Result

  • The device will play auido directly without showing content on the screen

02_button_example

  • 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.

Code

02_button_example.ino

Code Analysis

  • Bind callback functions:

    button1.attachClick(click1);
    button1.attachDoubleClick(doubleclick1);
    button1.attachLongPressStart(longPressStart1);
    button1.attachLongPressStop(longPressStop1);
    button1.attachDuringLongPress(longPress1);

Operation Result

  • The screen shows no output
  • Button information is printed to the serial monitor

03_qmi8658_example

This demo the ESP32-S3-LCD-1.54 to obtain data from the onboard QMI8658 and print it via the serial monitor.

Code

03_qmi8658_example.ino

Code Analysis

  • Initialize QMI8658:

     if (!qmi.begin(Wire, QMI8658_L_SLAVE_ADDRESS, SENSOR_SDA, SENSOR_SCL)) {
    Serial.println("Failed to find QMI8658 - check your wiring!");
    while (1) {
    delay(1000);
    }
    }

Operation Result

  • The screen shows no output
  • Opening the serial monitor shows printed accelerometer and gyroscope data for the x, y, and z axes

04_gfx_helloworld

This demo demonstratesthe ESP32-S3-Touch-LCD-1.54 using the GFX_Library_for_Arduino to drive the screen and display "HelloWorld".

Code

04_gfx_helloworld.ino

Code Analysis

  • Configure the screen interface and screen resolution, etc.
    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);

Operation Result

  • The screen displays as follows:

05_esp_wifi_analyzer

This demo demonstrates the ESP32-S3-Touch-LCD-1.54 using the GFX_Library_for_Arduino to display WiFi channel signal strength.

Code

05_esp_wifi_analyzer.ino

Operation Result

  • The screen displays as follows:

06_gfx_u8g2_font

This demo demonstrates the ESP32-S3-Touch-LCD-1.54 using the GFX_Library_for_Arduino to display text in various languages by loading fonts.

Code

06_gfx_u8g2_font.ino

Operation Result

  • The screen displays as follows:

07_sd_card_test

This demo uses the ESP32-S3-Touch-LCD-1.54 to test the TF card read/write functionality.

Code

07_sd_card_test.ino

Code Analysis

  • 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;
    }

Operation Result

  • The screen shows no output
  • Open the serial monitor

08_lvgl_example_v8

This demo demonstrates running an lvgl (v8.4.0) example program on the ESP32-S3-Touch-LCD-1.54.

It is required to install lvgl v8.4.0 version. If you have installed other version, please reinstall.

Code

08_lvgl_example_v8.ino

Operation Result

  • The screen displays as follows:

09_lvgl_example_v9

This demo demonstrates running an lvgl (v9.3.0) example program on the ESP32-S3-Touch-LCD-1.54.

It is required to install lvgl v9.3.0 version. If you have installed other version, please reinstall.

Code

09_lvgl_example_v9.ino

Operation Result

  • The screen displays as follows:

10_esp_sr

This demo demonstrates running the ESP_SR example program on the ESP32-S3-LCD-1.54.

Preparation

  • Arduino project parameter settings, Partition Scheme: "ESP SR 16M (3MB APP/7MB SPIFFS/2.9MB MODEL)"

Code

10_esp_sr.ino

Code Analysis

  • Initialize ES7210 and I2S interface
    Wire.begin(I2C_PIN_SDA, I2C_PIN_SCL);
    es7210_init();
    i2s.setPins(I2S_PIN_BCK, I2S_PIN_WS, I2S_PIN_DOUT, I2S_PIN_DIN, I2S_PIN_MCK);
    i2s.setTimeout(1000);
    i2s.begin(I2S_MODE_STD, 16000, I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO);
  • Initialize ESP_SR
    ESP_SR.onEvent(onSrEvent);
    ESP_SR.begin(i2s, sr_commands, sizeof(sr_commands) / sizeof(sr_cmd_t), SR_CHANNELS_STEREO, SR_MODE_WAKEWORD);
  • Voice recognition command setup, generating voice control commands
        static const sr_cmd_t sr_commands[] = {
    { 0, "Turn on the light", "TkN nN jc LiT" },
    { 0, "Switch on the light", "SWgp nN jc LiT" },
    { 1, "Turn off the light", "TkN eF jc LiT" },
    { 1, "Switch off the light", "SWgp eF jc LiT" },
    { 1, "Go dark", "Gb DnRK" },
    { 2, "Start fan", "STnRT FaN" },
    { 3, "Stop fan", "STnP FaN" },
    };

Operation Result

  • The device wake word is "Hi ESP”
  • After wake-up, operations can be performed using voice recognition commands.


ESP-IDF

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

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 Development Environment

INFO

For the ESP32-S3-Touch-LCD-1.54 development board, ESP-IDF V5.5.0 or above is required.

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.

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 choose your desired version from the filter bar.

    Download EIM and offline package

    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).

    Download EIM and offline package 2

    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.

    Auto-detect offline package

    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.

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

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

    Install drivers via ESP-IDF Installation Manager

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.

    Search and install ESP-IDF extension in VS Code

  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.

Demo

The ESP-IDF demos are located in the ESP-IDF directory of the demo package.

01_factory

This demo is a comprehensive demo of ESP32-Touch-LCD-1.54, which is also the default demo flashed at factory

Hardware Connection

  • Connect the development board to the computer

Operation Result

ESP32-S3-Touch-LCD-1.54 ESP-IDF Example 1 Figure 1
ESP32-S3-Touch-LCD-1.54 ESP-IDF Example 1 Figure 2
ESP32-S3-Touch-LCD-1.54 ESP-IDF Example 1 Figure 3
ESP32-S3-Touch-LCD-1.54 ESP-IDF Example 1 Figure 4
  • The first page cycles through the colors red, green, and blue
  • The second page displays development board information
  • The third page shows the data read from the IMU
  • The fourth page shows the IP address of the connected Wi-Fi (if not connected or connection fails, it displays 0.0.0.0) and the discovered Wi-Fi networks

Specific Operations

  • Press and hold the left button, the speaker will play the sound captured by the microphone in real time
  • Double-click the middle button to turn off the screen; double-click again to restore the display
  • When powered by battery, long press the middle button to power on; long press again and release to power off
  • Click the left or right button to switch pages

02_button_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.

Hardware Connection

  • Connect the development board to the computer

Code Analysis

  • 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);

Operation Result

  • The screen shows no output
  • Open the serial debugging tool; button information is printed to the serial port
    ESP32-S3-Touch-LCD-1.54 ESP-IDF Example 2 Figure 1

03_qmi8658_example

This demo demonstrates how to use the sensorlib library to read data from the qmi8658 and print it.

Hardware Connection

  • Connect the development board to the computer

Code Analysis

  • Read Accelerometer, Gyroscope, and Timestamp data from the qmi8658

      if (qmi.getDataReady())
    {
    if (qmi.getAccelerometer(acc.x, acc.y, acc.z))
    {
    printf("ACCEL--x:%5.2f y:%5.2f z:%5.2f ", acc.x, acc.y, acc.z);
    }

    if (qmi.getGyroscope(gyr.x, gyr.y, gyr.z))
    {
    printf("GYRO--x:%5.2f y:%5.2f z:%5.2f ", gyr.x, gyr.y, gyr.z);
    }
    printf("Temperature:%5.2f degrees C", qmi.getTemperature_C());
    }
    printf("Timestamp:%ld \r\n", qmi.getTimestamp());

Operation Result

  • The screen shows no output
  • Open the serial debugging tool; qmi8658 data information is printed to the serial port
    ESP32-S3-Touch-LCD-1.54 ESP-IDF Example 3 Figure 1

04_sd_card_test

This demo uses the ESP32-S3-Touch-LCD-1.54 to test the TF card read/write functionality.

Hardware Connection

  • Insert the TF card into the card slot (TF card needs to be formatted as FAT32)
  • Connect the development board to the computer

Code Analysis

  • 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 the 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);

Operation Result

  • The screen shows no output
  • Open the serial debugging tool; TF card information is printed to the serial port
    ESP32-S3-LCD-0.85 ESP-IDF Example 4 Figure 1

05_lvgl_example

This demo demonstrates running an lvgl example program on the ESP32-S3-Touch-LCD-1.54 (supports lvgl v8 and lvgl v9).

  • The default LVGL version used is v9.3.0. To change the version, modify the LVGL configuration in the main/idf_component.yml file, for example, change it to lvgl/lvgl:^8.4.0.
    ESP32-S3-LCD-0.85 ESP-IDF Example 5 Figure 1

Hardware Connection

  • Connect the development board to the computer

Code Analysis

  • Initialize:

       /* LCD HW initialization */
    ESP_ERROR_CHECK(app_lcd_init());

    /* Touch initialization */
    app_touch_init();

    /* LVGL initialization */
    ESP_ERROR_CHECK(app_lvgl_init());

Operation Result


Resources

1. Hardware Resources

Development Board Design Files

2. Technical Manuals

3. Demo

4. Software Tools


Support

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

Email: services01@spotpear.com

TAG: 4.2 inch e-Paper Display G Red/Yellow/Black/White 4.2inch E-link Screen For Arduino /Raspberry Pi /Jetson Nano /STM32 0.99inch Milk-V Duo RV1106 SC3336 JETSON-NANO-MINI Milk V Duo IO Board Tutorial ESP32 1.9inch LCD Raspberry Pi Pico 2 RP2350 Core A Development Board RP2350A Raspberry Pi Pico 10.1inch DVI LCD Luckfox Pico RJ45 Raspberry Pi 5 PCIe to M.2 NVMe SSD Adapter Board (D) HAT Pi5-2280-2242-2230 Raspberry Pi 21.5inch FHD LCD 1080x1920 Capacitive TouchScreen Display For Raspberry Pi/Jetson Nano/ AURORA AI Laser Radar And Dual Eye Camera IMU Integrated Positioning Map For Android/ROS+RoboStudio ESP32 IR Thermal Imaging Camera Gyroscope Servo PWM motor WP5320 WP5335 35/20KG.CM 180&deg; PWM digital servo double ball bearings Image-Modulation-Tutorial User Guide Raspberry Pi 5 Serial Raspberry Pi Pico 2 RP2350 1.28 inch Round LCD TouchScreen Development Board 240x240 Display QMI8658 6-Axis $17.9 Raspberry Pi 7 inch CAPLCD 1280x800 Capacitive TouchScreen HDMI/Type C Display Monitor For Computer mini PC

[Tutorial Navigation]