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-Touch-LCD-1.83 is a high-performance and highly integrated MCU board designed by Waveshare. It is equipped with a 1.83inch capacitive LED screen, a highly integrated power management chip, a 6-axis sensor (3-axis accelerometer and 3-axis gyroscope), RTC, low-power audio codec chip and other peripherals in a smaller board size, which are convenient for development and embedding into the product.




ESP32-S3-Touch-LCD-1.83 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.0.5 |
| Library Name | Description | Version | Library Installation Requirement |
|---|---|---|---|
| Arduino_DriveBus | CST816 Touch chip driver library | —— | "Install Offline" |
| GFX_Library_for_Arduino | GFX graphical library for ST7789 | v1.4.9 | "Install Online" or "Install Offline" |
| lvgl | LVGL graphical library | v8.4.0 | "Install Online" requires copying the demos folder to src after installation. "Install Offline" is recommended |
| Mylibrary | Development board pin macro definition | —— | "Install Offline" |
| SensorLib | PCF85063, QMI8658 sensor driver library | v0.2.1 | "Install Online" or "Install Offline" |
| lv_conf.h | LVGL configuration file | —— | "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_HelloWorld | Demonstrates the basic graphics library functions and can also be used to test the basic performance of display screens and the display effect of random text | GFX_Library_for_Arduino |
| 02_Drawing_board | Demonstrates the basic graphics library functions and can also be used to test the basic performance of display screens and the display effect of random text | GFX_Library_for_Arduino, Arduino DriveBus |
| 03_GFX_AsciiTable | Prints ASCII characters in rows and columns on the display screen according to the screen size | GFX_Library_for_Arduino |
| 04_GFX_ESPWiFiAnalyzer | Draws the WiFi band signal strength on the ST7789 display | GFX_Library_for_Arduino |
| 05_GFX_Clock | A simple ST7789 clock example, implemented through basic pointer marking and time management | GFX_Library_for_Arduino |
| 06_GFX_PCF85063_simpleTime | Displays the current time | SensorLib, GFX_Library_for_Arduino |
| 07_LVGL_PCF85063_simpleTime | Use the PCF85063 RTC module to display the current time on the ST7789 display under LVGL | LVGL, SensorLib |
| 08_LVGL_QMI8658_ui | Display graphics using LVGL and communicate with the QMI8658 IMU to obtain accelerometer and gyroscope data | LVGL, SensorLib |
| 09_LVGL_Arduino | LVGL demonstration | LVGL, Arduino DriveBus |

Hardware connection

Code analysis
if (!gfx->begin()) {
USBSerial.println("gfx->begin() failed!");
}
gfx->fillScreen(BLACK);
gfx->setCursor(10, 10);
gfx->setTextColor(RED);
gfx->println("Hello World!");
gfx->setCursor(random(gfx->width()), random(gfx->height()));
gfx->setTextColor(random(0xffff), random(0xffff));
gfx->setTextSize(random(6), random(6), random(2));
gfx->println("Hello World!");
Result demonstration

Hardware connection
Code analysis
gfx->begin();
gfx->fillScreen(WHITE);
for(int i = 0;i <= 255;i++){
gfx->Display_Brightness(i);
gfx->setCursor(30, 150);
gfx->setTextColor(BLUE);
gfx->setTextSize(4);
gfx->println("Loading board");
delay(3);
}
Result demonstration

Hardware connection
Code analysis
if (!gfx->begin()) {
USBSerial.println("gfx->begin() failed!");
}
int numCols = LCD_WIDTH / 8;
int numRows = LCD_HEIGHT / 10;
// Label the line number
gfx->setTextColor(GREEN);
for (int x = 0; x < numRows; x++) {
gfx->setCursor(10 + x * 8, 2);
gfx->print(x, 16);
}
// Label the column number
gfx->setTextColor(BLUE);
for (int y = 0; y < numCols; y++) {
gfx->setCursor(2, 12 + y * 10);
gfx->print(y, 16);
}
char c = 0;
for (int y = 0; y < numRows; y++) {
for (int x = 0; x < numCols; x++) {
gfx->drawChar(10 + x * 8, 12 + y * 10, c++, WHITE, BLACK);
}
}
Result demonstration

Hardware connection
Code analysis
setup():Initialize serial port communication;
Set WiFi to site mode and disconnect;
Initialize the display, obtain the screen size, and calculate various drawing parameters;
Set the screen background to black and draw the title bar.
loop():Scan WiFi networks and get network information, including channels, RSSI, BSSID, and SSID;
Count the number of networks, noise levels, and peak signal strength on each channel;
Clear old graphics and draw new ones based on the scan results, including signal strength ellipses and network information text;
Print the number of networks scanned and the channel with the least noise;
Draw graph baselines and channel numbering;
Enter the low-power mode according to the conditions.
Result demonstration

Hardware connection
Code analysis
void redraw_hands_cached_draw_and_erase() {
gfx->startWrite();
draw_and_erase_cached_line(center, center, nsx, nsy, SECOND_COLOR, cached_points, sHandLen + 1, false, false);
draw_and_erase_cached_line(center, center, nhx, nhy, HOUR_COLOR, cached_points + ((sHandLen + 1) * 2), hHandLen + 1, true, false);
draw_and_erase_cached_line(center, center, nmx, nmy, MINUTE_COLOR, cached_points + ((sHandLen + 1 + hHandLen + 1) * 2), mHandLen + 1, true, true);
gfx->endWrite();
}
Result demonstration

Hardware connection
Code analysis
loop() :Result demonstration

Hardware connection
Code analysis
setup():Initialize serial communication, prepare possible serial debugging at baud rate of 115200;
Try to connect the PCF85063 real-time clock chip, if the connection fails, enter an infinite loop;
Set the initial time of the real-time clock to October 23, 2025, 15:23:49;
Initialize the display and set the screen brightness;
Initialize LVGL and register the logging output function (if logging is enabled);
Configure the LVGL display driver and drawing buffer, as well as initialize the input device driver (which is a virtual pointer input device driver);
Create a timer to periodically trigger the LVGL clock update
Create a label and set the initial text to "Initializing..."
loop():Call lv_timer_handler to have LVGL handle graphical interface tasks;
Check the time for updates every second. If it has been updated, obtain the current time of the real-time clock, output it through the serial port, format the time into a specific format, update the text content of the label, and set the label's font to lv_font_montserrat_40.
Result demonstration

Hardware connection
Code analysis
my_disp_flush() :This function is the refresh function of the LVGL display driver. It is responsible for refreshing the LVGL drawing buffer content to the display screen;
Based on different color formats, call the corresponding functions of the gfx object to draw the bitmap to a specific area;
Finally, LVGL is notified that the refresh of the display has been completed.
loop():Call lv_timer_handler to have LVGL handle graphical interface tasks;
Check if new data is ready for the QMI (QMI8658 sensor object). If available, attempt to acquire acceleration data and gyroscope data, and output through the serial port;
At the same time, the acceleration data is updated to the LVGL graph to show the change of acceleration on the three axes in real time;
Increase the frequency of data polling with delay(20) to ensure that sensor data is captured in a timely manner and the display is updated.
Result demonstration

Hardware connection
Result demonstration
This example demonstrates LVGL Widgets, achieving a frame rate of 20 to 30 frames in dynamic state
Use of LVGL components
When developing using the LVGL framework, you can call the components according to the component instructions provided in the LVGL official documentation: LVGL8.3 Documents
Below is a case study of LVGL actual components in the Arduino IDE
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.







①Select the corresponding demo
②Its readme will state what chip the demo applies to (how to use the demo and the file structure are described below, omitted here)
③Click to create the demo




①.ESP-IDF Development Environment Version Manager, when our project requires differentiation of development environment versions, it can be managed by installing different versions of ESP-IDF. When the project uses a specific version, it can be switched to by utilizing it
②.Device flashing COM port, select to flash the compiled program into the chip
③.Select set-target chip model, select the corresponding chip model, for example, ESP32-P4-NANO needs to choose esp32p4 as the target chip
④.menuconfig, click it to modify sdkconfig configuration file, please refer to project configuration details
⑤.fullclean button, when the project compilation error or other operations pollute the compiled content, you can clean up all the compiled content by clicking it
⑥.Build project, when a project satisfies the build, click this button to compile
⑦.Current download mode, the default is UART
⑧.flash button, when a project build is completed, select the COM port of the corresponding development board, and click this button to flash the compiled firmware to the chip
⑨.monitor enable flashing port monitoring, when a project passes through Build --> Flash, click this button to view the log of output from flashing port and debugging port, so as to observe whether the application works normally
⑩.Debug
⑪.Build Flash Monitor one-click button, which is used to continuously execute Build --> Flash --> Monitor, often referred to as "little flame"









CMakeLists.txt.CMake first reads the content of the top-level CMakeLists.txt in the project directory to read the build rules and identify the content to be compiled. When the required components and demos are imported into the CMakeLists.txt, the compilation tool CMake will import each content that needs to be compiled according to the index. The compilation process is as follows:

| Demo | Basic Description |
|---|---|
| 01_AXP2101 | Obtain power-related data through the ported XPowersLib to drive AXP2101 |
| 02_lvgl_demo_v9 | Run LVGL V9 demo |
| 03_esp-brookesia | Run esp-brookesia demo, based on the V0.4.2 release version |
| 04_Immersive_block | Immersive experience of block shaped objects tilting in the direction of gravity using QMI8658 |
| 05_Spec_Analyzer | Implement a simple audio capture analyzer with LVGL |
| 06_videoplayer | Use LVGL to read AVI video playback from TF card, including audio playback |
Demo description
Hardware connection
Code analysis
Result demonstration

Demo description
Hardware connection
Result demonstration

Demo description
Hardware connection
Result demonstration


Demo description
Hardware connection
Result demonstration


Demo description
Hardware connection
Result demonstration

Demo description
Hardware connection
Result demonstration


Custom audio
Users can customize audio playback segments by following the steps below (some programming knowledge is required)
ffmpeg -i a.mp4 -vcodec mjpeg -s 'resolution width'x'resolution height' -r 30 -q:v 2 -acodec pcm_s16le -ar 44100 -ac 2 a.avi
..\ESP32-S3-Touch-LCD-1.83-Demo\Firmware

Windows system:
①Check via Device Manager: Press the Windows + R keys to open the "Run" dialog box; Enter devmgmt.msc and press Enter to open Device Manager; Expand the "Ports (COM & LPT)" section, where all COM ports and their current status will be listed.
②Use Command Prompt to check: Open the Command Prompt (CMD); Enter the mode command, which will display the status information for all COM ports.
③Check hardware connections: If you have already connected an external device to the COM port, it usually occupies a port number, and you can determine which port is being used by checking the connected hardware.
Linux system:
①Use the dmesg command to check: Open the terminal.
②Use the ls command to check: Enter ls /dev/ttyS* or ls /dev/ttyUSB* to list all serial port devices.
③Use the setserial command to check: Enter setserial -g /dev/ttyS* to view the configuration information for all serial port devices.
Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Email: services01@spotpear.com