Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
ESP32-S3-Touch-AMOLED-1.43 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.
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. | |
ESP-IDFESP-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.
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" | ≥3.1.0 |
..\ESP32-S3-Touch-AMOLED-1.43-Demo\Arduino\libraries
Library Name | Description | Version | Library Installation Requirement |
---|---|---|---|
LVGL | Graphical library | v8.4.0 | "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 |
---|---|---|
01_ADC_Test | Read the current voltage value of the system | - |
02_I2C_PCF85063 | Print the real-time time of RTC chip | - |
03_I2C_QMI8658 | Print the original data sent by the IMU | - |
04_SD_Card | Load and display the information of the TF card | - |
05_WIFI_AP | Set to AP mode to obtain the IP address of the access device | - |
06_WIFI_STA | Set to STA mode to connect to WiFi and obtain an IP address | - |
07_LVGL_Test | LVGL demo | LVGL |
Demo description
Hardware connection
Code analysis
Result demonstration
Demo description
Hardware connection
Code analysis
Result demonstration
Demo description
Hardware connection
Code analysis
Result demonstration
Demo description
Hardware connection
Code analysis
SD_Read_Mode
under the source file sd_card_bsp.cpp
, the macro definition uses the SDMMC communication protocol by default, which can be modified to SDSPI#define SD_Read_Mode USER_SPI
Result demonstration
Demo description
Hardware connection
Code analysis
const char* ssid = "bsp_esp_demo"; const char* password = "waveshare"; WiFi.softAP(ssid,password);
Result demonstration
Demo description
Hardware connection
Code modification
This project implements the chip connecting to WIFI and obtaining an IP address while in STA mode. Before compiling and downloading the firmware, some code needs to be modified to the name and password of the available WIFI router in the current environment
Code analysis
ssid
and password
). If the connection is successful, it prints the local IP address; if the connection fails within a certain period (20 * 500 milliseconds), it prints the connection failure message. At the same time, the function can also set the auto-connection and auto-reconnect functionsResult demonstration
Demo description
Hardware connection
Code analysis
For LVGL, lvgl_conf.h is its configuration file. Below, some commonly used settings are explained, and some LVGL demos and file systems can also be configured in the conf file
/*Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888)*/
#define LV_COLOR_DEPTH 16//Color depth, a macro definition that must be concerned with porting LVGL
#define LV_MEM_CUSTOM 0
#if LV_MEM_CUSTOM == 0
/*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/
#define LV_MEM_SIZE (48U * 1024U) /*[bytes]*/
/*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/
#define LV_MEM_ADR 0 /*0: unused*/
/*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/
#if LV_MEM_ADR == 0
#undef LV_MEM_POOL_INCLUDE
#undef LV_MEM_POOL_ALLOC
#endif
#else /*LV_MEM_CUSTOM*/
#define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
#define LV_MEM_CUSTOM_ALLOC malloc
#define LV_MEM_CUSTOM_FREE free
#define LV_MEM_CUSTOM_REALLOC realloc
#endif /*LV_MEM_CUSTOM*/
//The above section is mainly for LVGL memory allocation,
//which defaults to lv_mem_alloc() versus lv_mem_free().
Code modification
#define EXAMPLE_Rotate_90
in lcd_bsp.c file and uncomment this macro definition. Software rotation performance is not as good as hardware rotation#define EXAMPLE_Rotate_90
Result demonstration
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.
Demo | Basic Description | Dependency Library |
---|---|---|
01_ADC_Test | Read the current voltage value of the system | - |
02_I2C_PCF85063 | Print the real-time time of RTC chip | - |
03_I2C_QMI8658 | Print the original data sent by the IMU | - |
04_SD_Card | Load and display the information of the TF card | - |
05_WIFI_AP | Set to AP mode to obtain the IP address of the access device | - |
06_WIFI_STA | Set to STA mode to connect to WiFi and obtain an IP address | - |
07_LVGL_Test | LVGL demo | LVGL |
08_LVGL_SDIMG | Combine LVGL & SDCard & IMG demos | LVGL |
09_FactoryProgram | Comprehensive project | LVGL |
Demo description
Hardware connection
Code analysis
Result demonstration
Demo description
Hardware connection
Code analysis
Result demonstration
Demo description
Hardware connection
Code analysis
Result demonstration
After the demo is flashed, the running result of the device is as follows:
Hardware connection
Demo description
Code analysis
SD_Read_Mode
under the source file sd_card_bsp.cpp
, the macro definition uses the SDMMC communication protocol by default, which can be modified to SDSPI#define SD_Read_Mode USER_SPI
Result demonstration
Demo description
Hardware connection
Code analysis
Result demonstration
Demo description
Hardware connection
Code analysis
Code modification
This project implements the chip connecting to WIFI and obtaining an IP address while in STA mode. Before compiling and downloading the firmware, some code needs to be modified to the name and password of the available WIFI router in the current environment
Result demonstration
After the demo is flashed, the running result of the device is as follows:
Demo description
Hardware connection
Code analysis
#define EXAMPLE_Rotate_90
in main
file and uncomment this macro definition. Software rotation performance is not as good as hardware rotation#define EXAMPLE_Rotate_90
Result demonstration
Demo description
Hardware connection
Code analysis
#define EXAMPLE_Rotate_90
in main
file and uncomment this macro definition. Software rotation performance is not as good as hardware rotation#define EXAMPLE_Rotate_90
Result demonstration
Demo description
Hardware connection
Result demonstration
..\ESP32-S3-Touch-LCD-1.43-Demo\Firmware
①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.
Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Mobile: +86 13434470212
Email: services01@spotpear.com