Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales@spotpear.com
dragon_manager@163.com
tech-support@spotpear.com
zhoujie@spotpear.com
WhatsApp:13246739196
ESP32-S3-LCD-1.28 is a low-cost, high-performance MCU board designed by Waveshare. It features peripherals such as a 1.28-inch LCD screen, a lithium-ion battery charging chip, a six-axis IMU sensor (three-axis accelerometer and three-axis gyroscope), and the ESP32-S3R2, a system-on-chip (SoC) that integrates low-power Wi-Fi and BLE 5.0, as well as external 16MB Flash and 2MB PSRAM. The hardware encryption accelerator, RNG, HMAC, and digital signature modules within the Soc can meet the security requirements of the Internet of Things. A variety of low-power operating states meet the power consumption requirements of application scenarios such as the Internet of Things (IoT), mobile devices, wearable electronic devices, and smart homes.
1. ESP32-S3R2 2. W25Q128JVSIQ 3. QMI8658 4. ME6217C33M5G 5. CH343P 6. ETA6096 |
8. BOOT button 9. RESET button 10. MX1.25 Lithium battery interface 11. USB Type-C interface 12. 2.4G ceramic antenna |
ESP32-S3R2 | LCD | MX1.25 | QMI8658 | other |
GPIO0 | BOOT0 | |||
GPIO1 | ADC | |||
GPIO5 | TP_INT | |||
GPIO6 | SDA | |||
GPIO7 | SCL | |||
GPIO8 | LCD_DC | |||
GPIO9 | LCD_CS | |||
GPIO10 | LCD_CLK | |||
GPIO11 | LCD_MOSI | |||
GPIO12 | LCD_RST | |||
GPIO40 | LCD_BL | |||
GPIO47 | INT1 | |||
GPIO48 | INT2 |
LCD parameters | |||
Display chip | GC9A01A | Display interface | SPI |
Resolution | 240(H)RGB x 240(V) | Display size | Φ32.4mm |
Display panel | IPS | Pixel size | 0.135(H) x 0.135(V) (mm) |
IMU parameters | |||
Sensor name | QMI8658 | ||
Accelerometer characteristics | Resolution: 16 bits Range (optional): ±2, ±4, ±8, ±16g | ||
Gyroscope characteristics | Resolution: 16 bits Range (optional): ±16, ±32, ±64, ±128, ±256, ±512, ±1024, ±2048°/sec |
ESP32-S3-LCD-1.28 currently provides two development tools and frameworks, Arduino IDE and MicroPython, providing flexible development options, you can choose the right development tool according to your project needs and personal habits.
Arduino IDEArduino 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. | |
MicroPythonMicropython is a full implementation of the Python 3 programming language that runs directly on embedded hardware such as ESP32, Raspberry Pi Pico, etc. You can run Python scripts directly on the board through REPL, which is very suitable for rapid prototyping. |
Arduino and MicroPython are suitable for beginners and non-professionals because they are easy to learn and quick to get started.
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.
Board name | Board installation requirement | Version number requirement |
---|---|---|
esp32 by Espressif Systems | "Install Offline" / "Install Online" | 2.0.12 |
Library Name | Description | Version | Library Installation Requirement |
---|---|---|---|
LVGL | Graphical library | v8.3.10 | "Install Offline" |
TFT_eSPI | LCD library | v2.5.34 | "Install Offline" |
TFT_eSPI_Setups | Custom library | -- | "Install Offline" |
File
-> New Sketch
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Hello, World!");
delay(2000);
}
File
-> Save As...
. In the pop-up menu, select the path to save the project, and enter a project name, such as Hello_World, click Save
①. Click to select the dropdown menu option Select Other Board and Port;
②. Search for the required development board model esp32s3 dev module and select;
③. Select COM Port;
④. Save the selection.
①. Compile the program; ②. Compile and download the program; ③. Download successful.
Demo | Basic Description | Dependency Library |
---|---|---|
ESP32-S3-LCD-1.28-Test | Test onboard device functionality | --- |
LVGL_Arduino | Display LVGL benchmark, music, etc | LVGL, TFT_eSPI , TFT_eSPI_Setups |
LVGL_Chinese_Font | Display the 1000 built-in Chinese character fonts of LVGL | LVGL, TFT_eSPI, TFT_eSPI_Setups |
LVGL_Chinese_7500_Char | Display the 7500 built-in Chinese character fonts of LVGL | LVGL, TFT_eSPI, TFT_eSPI_Setups |
Demo description
Hardware connection
Code analysis
Paint_Clear(WHITE)
to clear the image cache, then redraw the graphics and display the sensor data and the voltage value after ADC conversionResult demonstration
Demo description
Hardware connection
Code analysis
w
and the height h
of the area to be refreshed, this is done by obtaining the difference in coordinates of the input display area and adding 1tft.startWrite()
to start writing data to the TFT display, and then use tft.setAddrWindow
to set the display area of the TFT display to the area specified by the incoming area
tft.pushColors
to push the color data (the color data pointing to the color_p
is converted to the uint16_t
type) to the TFT display for display, where the w * h
parameter indicates the number of pixels to be pushed, true
indicates that a data transfer completion operation is performed after the push operation is completedlv_disp_flush_ready(disp_drv)
to notify LVGL of the completion of the refresh so that LVGL can proceed with subsequent operationsmy_disp_flush
function as the LVGL refresh callback functiontest1_240_240_4
example_increase_reboot
functionResult demonstration
Demo description
Hardware connection
Code analysis
tft.startWrite()
、tft.setAddrWindow()
and tft.pushColors()
to write the color data color_p from the LVGL to a specific area of the TFT displaylv_disp_flush_ready()
to notify LVGL that the refresh is completeResult demonstration
Demo description
Hardware connection
Code analysis
tft
and touch
sensor, including setting the rotation direction of the display and possible touch calibration datadraw_buf
and display driver disp_drv
, set the display resolution, refresh callback function, etc., and register the display driver with LVGLindev_drv
, set it to the pointer type and specify the touch read callback function, and then register the input device driverlabel
, set the text font, text content (supporting text color recreation), and display it centrally on the screenlv_timer_handler()
function to let the LVGL graphics library handle its internal scheduled tasks and eventsdelay(5)
function to introduce a small delay to avoid excessive CPU usage by the demoResult demonstration
This section focuses on setting up the MicroPython development environment, primarily covering firmware flashing, installation, and the use of Thonny. For the installation part of Thonny, detailed explanations of the installation steps and usage instructions are provided, offering comprehensive and clear guidance for developers to build a MicroPython development environment.
...\ESP32-S3-LCD-1.28-Demo\Firmware\MicroPython-bin
Demo | Basic Description |
---|---|
alien.py | Display the "alien.jpg" image randomly |
bitarray.py | Create and display animation of the Pac-Man sprite in multiple random locations |
hello.py | Randomly display different colors of "Hello!" text, and you can switch different rotation angles by looping |
hershey.py | Loop through different greetings |
jpg.py | Alternate between two JPEG images |
noto_fonts.py | Displays the names of three different fonts |
pbitmap.py | Display a precompiled bitmap image |
rotation.py | Cycle through the text display at different rotation values |
scroll.py | Implement smooth scrolling of characters on the display screen |
Demo description
Hardware connection
Code analysis
spi_interface
: Establish SPI communication with the display screenwidth
and height
: Set the display resolutionreset_pin
: Connect various control pins of the display screenrotation
: Set the initial rotation angleResult demonstration
Demo description
Hardware connection
Code analysis
SPRITE_STEPS
by taking the conversion, corresponding to different animation frames or states of the spritetft.map_bitarray_to_rgb565
function selects bitmap data from the SPRITE_BITMAPS
based on the current steps of the sprite, converts it into an RGB565 format buffer named sprite
. At the same time, the width of the sprite, as well as the foreground and background colors, were specifiedtft.blit_buffer
function draws the converted buffer to a specific location on the display screen, which is determined by the current coordinates of the sprite and specifies its width and heightResult demonstration
Demo description
Hardware connection
Code analysis
tft.text
function to display text at random positions in random colorsResult demonstration
Demo description
Hardware connection
Code analysis
Result demonstration
Demo description
Hardware connection
Code analysis
tft.jpg
function to display the image in a slower way at a specific location, and wait 5 secondsResult demonstration
Demo description
Hardware connection
Code analysis
Result demonstration
Demo description
Hardware connection
Code analysis
tft.pbitmap
to display the image in the pre-compiled bitmap moduletft.pbitmap: Display pre-compiled bitmap on the screen
Result demonstration
Demo description
Hardware connection
Code analysis
Result demonstration
Demo description
Hardware connection
Code analysis
Result demonstration
...\ESP32-S3-LCD-1.28-Demo\Firmware\factory-bin
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.
①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.
①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.
GC9A01A
MX1.25 2P connector, for 3.7V battery, supports charging and discharging
Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Email: services01@spotpear.com