Environment Set-up
- Install Arduino IDE.
- Enter Arduino IDE after installation.
- Go to the board manager, search for esp32, select the latest version of esp32 by Espressif Systems at the bottom, and click install (if it doesn't install correctly, you can try using a phone hotspot).
- Restart the Arduino IDE after installation, and then you can use it.
- Modify the location of the above project file folder as c:\Users\Waveshare\AppData\Local\Arduino15\packages (Waveshare is the computer username).
Install Libraries
- Please note if this library has already been installed previously. If it has, please save the existing library to prevent errors or failures when running other demos.
- Enter the sample demo file "ESP32_S3_Touch_LCD_2.8\LVGL_Arduino", double-click on LVGL_Arduino.ino to open it.
- Search for lvgl library and install it (this step is for creating the library file folder in Arduino environment, if you have installed other libraries before and the following file folder exist, you can skip this step.)
- Enter "c:\Users\Waveshare\AppData\Local\Arduino15\packages\libraries" (Waveshare is the computer username). This is done by going to libraries in the project folder directory, if you are not sure which folder it is in please go to Preferences to check.
- Delete the lvgl library downloaded before (skip this step if you do not install this library before).
- Please install the three libraries from the example file and create a new "Lib" folder in the example path.
- Download and unzip the following libraries:(lvgl library, TFT_eSPIlibrary and audioI2S library), and then store them in the newly created "Lib" folder in the specified path.
- Copy the above libraries in "c:\Users\Waveshare\AppData\Local\Arduino15\packages\libraries" (Waveshare is the computer username)
- Next, install NTPClient library:
- Install SensorLib library:
Sample Demo
- Reopen the example, and follow the steps below to display. The example demonstrates the functionalities of SD Card, Flash, QMI8658, RTC, WIFI, Bluetooth, and audio playback.
- Select the model ESP32S3 Dev Module and port:
- Set the board parameters:
- Compile and upload the example:
- Upon successful upload, you will observe two operational pages.
- Page 1 displays the following parameters separately.
Parameters | Function | Description |
SD Card | Display SD card size | Please note that only SD cards with below 16GB are supported |
Flash Size | Display Flash size | The current onboard 16MB Flash |
Angular deflection | Display the angular deflection of the board | Display the deflection of threen orientations |
RTC Time | Display RTC time | Display the current RTC time
If the RTC time is not consistent with the current time, it is because the power-down state does not retain data, if you need to keep the RTC time normal, you need to connect the RTC battery and update the RTC time. |
Wireless number | Display the scanned WiFi and Bluetooth numbers | When it finishes, display "Scan Finish" at the end.
|
- Page 2 is the UI page for playing mp3 audio from the root directory of the SD card.
Project Reference
Products using the ESP32 in the Arduino IDE playability is relatively high, can be in the framework of the existing program can simply modify the UI interface to achieve cool operation. In some open-source platform resources can also be used directly with minor modifications, the more classic ones are as follows:
Github