ESP32-S3-Touch-LCD-2.8B

From Waveshare Wiki
Jump to: navigation, search
ESP32-S3-Touch-LCD-2.8B
ESP32-S3-Touch-LCD-2.8B

2.8inch, 480×640, I2C/RGB
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Overview

Version Description

This development board includes both touch and non touch versions. Please click on the corresponding product to view the usage instructions.
ESP32-S3-LCD-2.8B wiki ESP32-S3-Touch-LCD-2.8B wiki
ESP32-S3-LCD-2.8B
Without Touch Control
ESP32-S3-Touch-LCD-2.8B
With Touch Control

Usage Instructions

ESP32-S3-Touch-LCD-2.8B currently provides two development tools and frameworks, Arduino IDE and ESP-IDF, providing flexible development options, you can choose the right development tool according to your project needs and personal habits.

Development Tools

180px-Arduino-IDE-logo.jpg

Arduino IDE

Arduino IDE is an open source electronic prototyping platform, convenient and flexible, easy to get started. After a simple learning, you can start to develop quickly. At the same time, Arduino has a large global user community, providing an abundance of open source code, project examples and tutorials, as well as rich library resources, encapsulating complex functions, allowing developers to quickly implement various functions.

180px-ESP-IDF-logo.jpg

ESP-IDF

ESP-IDF, or full name Espressif IDE, is a professional development framework introduced by Espressif Technology for the ESP series chips. It is developed using the C language, including a compiler, debugger, and flashing tool, etc., and can be developed via the command lines or through an integrated development environment (such as Visual Studio Code with the Espressif IDF plugin). The plugin offers features such as code navigation, project management, and debugging, etc..


Each of these two development approaches has its own advantages, and developers can choose according to their needs and skill levels. Arduino are suitable for beginners and non-professionals because they are easy to learn and quick to get started. ESP-IDF is a better choice for developers with a professional background or high performance requirements, as it provides more advanced development tools and greater control capabilities for the development of complex projects.

Components Preparation

  • ESP32-S3-Touch-LCD-2.8B x1
  • TF card x 1
  • USB cable (Type-A to Type-C) x 1
Before operating, it is recommended to browse the table of contents to quickly understand the document structure. For smooth operation, please read the FAQ carefully to understand possible problems in advance. All resources in the document are provided with hyperlinks for easy download.

Working with Arduino

This chapter introduces setting up the Arduino environment, including the Arduino IDE, management of ESP32 boards, installation of related libraries, program compilation and downloading, as well as testing demos. It aims to help users master the development board and facilitate secondary development. Arduino-flow-04.png

Environment Setup

Download and Install Arduino IDE

  • Click to visit the Arduino official website, select the corresponding system and system bit to download
    ESP32-S3-AMOLED-1.91-Ar-software-01.png
  • Run the installer and install all by default
The environment setup is carried out on the Windows 10 system, Linux and Mac users can access Arduino-esp32 environment setup for reference. (To use on Mac, you need to install the MAC driver.)

Install ESP32 Development Board

  • ESP32-S3-Touch-LCD-2.8B required development board installation description
Board name Board installation requirement Instruction
esp32-XIP-3.0.2 "Install Offline" The "esp32-XIP-3.0.2" board must be installed according to the installation tutorial

Install Library

  • When installing Arduino libraries, there are usually two ways to choose from: Install online and Install offline. If the library installation requires offline installation, you must use the provided library file
    For most libraries, users can easily search and install them through the online library manager of the Arduino software. However, some open-source libraries or custom libraries are not synchronized to the Arduino Library Manager, so they cannot be acquired through online searches. In this case, users can only manually install these libraries offline.
  • For library installation tutorial, please refer to Arduino library manager tutorial
  • ESP32-S3-Touch-LCD-2.8B library file path:
    ..\ESP32-S3-Touch-LCD-2.8B-Demo\Arduino\libraries
  • ESP32-S3-Touch-LCD-2.8B Library file installation instructions
Library Name Description Version Library Installation Requirement
LVGL Graphical library v8.3.10 "Install Offline"
For more learning and use of LVGL, please refer to LVGL official documentation

Run the First Arduino Demo

If you are just getting started with ESP32 and Arduino, and you don't know how to create, compile, flash, and run Arduino ESP32 programs, then please expand and take a look. Hope it can help you!

Demo

Demo-flow-01.png

  • ESP32-S3-Touch-LCD-2.8B demo
Demo Basic Description Dependency Library
LVGL_Arduino Test onboard device functionality LVGL
Collapse

LVGL_Arduino

Hardware connection


  • Insert the TF card into the development board (can be used without a TF card)
  • Connect the development board to the computer

Code analysis


  • Driver_Init ()
    • Initializes multiple hardware components, including flash testing, battery initialization, I2C bus initialization, chip-specific initialization, external IO settings, backlight initialization, real-time clock initialization, and gyroscope initialization, etc., to prepare the hardware for the normal operation of the system
  • Driver_Loop ()
    • As a continuous task, it constantly cycles to handle the gyroscope and real-time clock operations, and retrieves the battery voltage. Loops are executed every 100 milliseconds to avoid overusing CPU resources
  • setup ()
    • The setup function for Arduino, performing a series of initialization operations. It includes wireless module testing, hardware initialization, LCD initialization, TF card initialization, LVGL initialization, invoking LVGL's example functions, and creating a task to perform a hardware loop operation
  • loop()
    • The main loop function of Arduino, primarily calls the LVGL loop processing function, and introduces a 5 millisecond delay to ensure that the system's graphical interface can continuously update

Demo flashing


  • Select the Waveshare ESP32S3 XIP model and port

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

  • Set development board parameters

ESP32-S3-Touch-LCD-2.8C-demo-01.png

  • Flash the demo

Result demonstration


  • LCD screen display

ESP32-S3-Touch-LCD-2.8B-demo-01.png

  • Parameter description
Parameter Function Description
SD Card Display TF card size Connect the TF card, if the recognition fails, please format the TF card to FAT32 format (please wait for a while to reset and check again if the recognition fails for the first time)
Flash Size Display Flash size Current onboard 16MB Flash
Battery Voltage Battery voltage The battery voltage can be detected when the battery is connected
Angular deflection Display the angular deflection of the board Display the offset in three directions
RTC Time Display RTC time Display current RTC time
If the RTC time is not consistent with the current time, because the data cannot be retained in the power-off state, if you need to keep the RTC time normal, you need to connect the RTC battery and update the RTC time
Wireless scan Display the number of scanned WiFi When it finishes, display Scan Finish at the end
The buzzer test Buzzer control page Can control buzzer switch
Backlight brightness Brightness adjustment slider Can control screen brightness

Working with ESP-IDF

This chapter introduces setting up the ESP-IDF environment setup, including the installation of Visual Studio and the Espressif IDF plugin, program compilation, downloading, and testing of demos, to assist users in mastering the development board and facilitating secondary development. ESP-IDF-flow-01.png

Environment Setup

Download and Install Visual Studio

  • Open the download page of VScode official website, choose the corresponding system and system bit to download
    ESP32-S3-AMOLED-1.91-VScode-01.png
  • After running the installation package, the rest can be installed by default, but here for the subsequent experience, it is recommended to check boxes 1, 2, and 3
    ESP32-S3-AMOLED-1.91-VScode-02.png
    • After the first two items are enabled, you can open VSCode directly by right-clicking files or directories, which can improve the subsequent user experience.
    • After the third item is enabled, you can select VSCode directly when you choose how to open it.
The environment setup is carried out on the Windows 10 system, Linux and Mac users can access ESP-IDF environment setup for reference

Install Espressif IDF Plugin

  • It is generally recommended to use Install Online. If online installation fails due to network factor, use Install OIffline
  • For more information about how to install the Espressif IDF plugin, see Install Espressif IDF Plugin
  • ESP32-S3-Touch-LCD-2.8B required Espressif IDF version description
Plugin name Plugin installation requirement Version number requirement
Espressif IDF "Install Offline" / "Install Online" ≥5.3.1

Run the First ESP-IDF Demo

If you are just getting started with ESP32 and ESP-IDF, and you don't know how to create, compile, flash, and run ESP-IDF ESP32 programs, then please expand and take a look. Hope it can help you!

Demo

Demo-flow-01.png

  • ESP32-S3-Touch-LCD-2.8B demo
Demo Basic Description
ESP32-S3-Touch-LCD-2.8B-Test Test onboard device functionality
Collapse

ESP32-S3-Touch-LCD-2.8B-Test

Hardware connection


  • Insert the TF card into the development board (can be used without a TF card)
  • Connect the development board to the computer

Code analysis


  • Driver_Init ()
    • This function performs hardware initialization and creates a task. It initializes the flash memory (possibly for checking or preparation), the battery, the I2C bus, the real-time clock, the gyroscope, and external IO. Then create a task Driver_Loop that continuously processes the gyroscope, the real-time clock, and gets the battery voltage, executing a loop operation every 100 milliseconds.
  • Driver_Loop()
    • As a continuous task, it cycles through the gyroscope and real-time clock operations, and retrieves the battery voltage. In this way, the status of these hardware devices is continuously updated.
  • app_main (): Drives the onboard device
    • This is the main entry function of the program. First initialize the wireless module, and then call Driver_Init for hardware initialization. Next, initialize the LCD display, touch input, TF card, and LVGL graphics library in sequence. Calling the example function Lvgl_Example1 of LVGL demonstrates specific graphical interface effects. In the main loop, it delays once every 10 milliseconds and calls lv_timer_handler to handle LVGL's timer events, ensuring the normal operation and updates of the graphical interface.

Result demonstration


  • LCD screen display

ESP32-S3-Touch-LCD-2.8B-demo-02.png

  • Parameter description
Parameter Function Description
SD Card Display TF card size Connect the TF card, if the recognition fails, please format the TF card to FAT32 format (please wait for a while to reset and check again if the recognition fails for the first time)
Flash Size Display Flash size Current onboard 16MB Flash
Battery Voltage Battery voltage The battery voltage can be detected when the battery is connected
Angular deflection Display the angular deflection of the board Display the offset in three directions
RTC Time Display RTC time Display current RTC time
If the RTC time is not consistent with the current time, because the data cannot be retained in the power-off state, if you need to keep the RTC time normal, you need to connect the RTC battery and update the RTC time
Wireless scan Display the number of scanned WiFi When it finishes, display Scan Finish at the end
The buzzer test Buzzer control page Can control buzzer switch
Backlight brightness Brightness adjustment slider Can control screen brightness

Flash Firmware Flashing and Erasing


  • The current demo provides test firmware, which can be used to test whether the onboard device functions properly by directly flashing the test firmware
  • Binary file path:
    ...\ESP32-S3-Touch-LCD-2.8B-Demo\Firmware\bin

Resources

Schematic Diagram

Demo

Project Diagram

Driver

Datasheets

ESP32-S3

Display

Other Components

Software Tools

Arduino

VScode

Firmware Flashing Tool

Other Resource Links

FAQ

 Answer:
  • Click the Reset button for more than 1 second, wait for the PC to re-recognize the device and then download again
  • Long press the BOOT button, press RESET at the same time, then release RESET, then release the BOOT button, at this time the module can enter the download mode, which can solve most of the problems that can not be downloaded.


 Answer:

It may be due to Flash blank and the USB port is not stable, you can long-press the BOOT button, press RESET at the same time, and then release RESET, and then release the BOOT button, at this time the module can enter the download mode to flash the firmware (demo) to solve the situation.


 Answer:
  • It's normal for the first compilation to be slow, just be patient


 Answer:
  • Some AppData folders are hidden by default and can be set to show.
  • English system: Explorer->View->Check "Hidden items"
  • Chinese system: File Explorer -> View -> Display -> Check "Hidden Items"


 Answer:
  • Windows system:

①View through Device Manager: Press the Windows + R keys to open the "Run" dialog box; input devmgmt.msc and press Enter to open the Device Manager; expand the "Ports (COM and LPT)" section, where all COM ports and their current statuses will be listed.
②Use the command prompt to view: Open the Command Prompt (CMD), enter the "mode" command, which will display status information for all COM ports.
③Check hardware connections: If you have already connected external devices to the COM port, the device usually occupies a port number, which can be determined by checking the connected hardware.

  • Linux system:

①Use the dmesg command to view: Open the terminal.
①Use the ls command to view: Enter ls /dev/ttyS* or ls /dev/ttyUSB* to list all serial port devices.
③Use the setserial command to view: Enter setserial -g /dev/ttyS* to view the configuration information of all serial port devices.


 Answer:
  • This situation is that the TF card is not installed or the TF card cannot be recognized. If this situation occurs, please wait for a period of time to reset the device. If it still cannot be resolved, please format the TF card to FAT32 format. If it still fails, please try a different TF card



 Answer:
  • Check the schematic diagram for different development boards with Type-C interfaces, and handle the output accordingly:
    • For development boards with direct USB output, printf function is supported for printing output. If you want to support output via the Serial function, you will need to enable the USB CDC On Boot feature or declare HWCDC.
    • For development boards with UART to USB conversion, both printf and Serial functions are supported for printing output, and there is no need to enable USB CDC On Boot.


 Answer:
  • The screen supports 262k color, but due to ESP limitations, RGB565 is used, and it is actually 65k



Support



Technical Support

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