Installing the ESP32 Package

In order to upload the LVGL demo code to the ESP32 terminal display, the ESP32 package must first be installed. To do this, open the Arduino IDE and click on File, then Preferences. Locate the Additional Boards Manager URLs field and enter the provided link. Click OK and then click on Tools, followed by Boards Manager. Search for ESP32 and select the version you wish to install; it is recommended to use version 2.0.3 as this will make the journey of learning ESP32 terminal smoother. Once the selection has been made, click Install.

Configuring the Compilation Environment

Once the ESP32 package has been installed, the compilation environment must be configured. To do this, click on Tools and select ESP32S3 Dev Module under Boards. Then choose QIO 80MHz under Flash Mode and OPI SRAM under PSRAM.

Installing the Libraries

After the compilation environment has been configured, the libraries must be installed. To do this, open the official website and download the factory program. This will contain a few demo codes which will help to understand the functionality of the ESP32 terminal. Once the program has been downloaded, open the Arduino IDE and click on Sketch, followed by Include Library and Add .ZIP Library. Select the downloaded file and click Open. The libraries will then be installed and the LVGL demo code can be uploaded to the ESP32 terminal display.

H file and uncomment the line that says define LVGL_ESP32_ILI9341 this will enable the lvgl library to work with the esp32 terminal display.

Downloading the Libraries

The Levy and GFX library and LVGL Library are essential for uploading the LVGL Demo Code to the ESP32 Terminal Display. To download these libraries, two methods can be employed. The first method is to download the library files from any source, such as the ESP32 Terminal webpage. The compressed file contains two directories: the library directory and the SRC directory. The SRC directory contains demo programs, while the library directory contains the commonly used libraries packaged by Elecrow. To install these libraries, simply copy all the files from the library directory to the Arduino Library directory. If the path to the Arduino Library directory is unknown, it can be found by opening Arduino and clicking on File, followed by Preferences. The path to the Arduino Library directory is located in the Sketchbook location.

Installing the LVGL Library

The second method for downloading the LVGL Library is to click on Sketch and select Manage Libraries. Search for LVGL and install the desired version. In this case, version 8.3.6 of the LVGL Library has been installed.

Configuring the LVGL Library

Once the library has been installed, it must be configured. To do this, open the Arduino Library directory and locate the LVGL Library. Copy the lvconf template.h file to the Arduino Library directory, renaming it as lvconf.h. Open the lvconf.h file and uncomment the line that says #define LVGL_ESP32_ILI9341. This will enable the LVGL Library to work with the ESP32 Terminal Display.

Uploading the Demo Code

To upload the LVGL Demo Code to the ESP32 Terminal Display, open the Arduino IDE and select the correct board. Then, open the lv_examples directory from the LVGL Library and select the desired example. Finally, click on Upload to upload the code to the ESP32 Terminal Display.

Then press the reset button on the esp32 terminal to put it into download mode. Once the esp32 terminal is in download mode, you can now select the port to upload the code. Go to tools, select the port and board type. Then click on the upload button. The code will now be compiled and uploaded to the esp32 terminal. Once the upload is complete, you should see the lvgl demo running on the esp32 terminal.

Configuring the LVGL Library

The first step in setting up the LVGL library for the ESP32 terminal display is to configure the lvconf.h file. This file is located in the lvgl library directory and is used to configure the library. To begin configuring, first locate line 15 and change the 0 to 1 to enable the lvconf.h file. Second, find line 88 and change the 0 to 1 to use a custom clock. Third, find line 730 and 732 and change the 0 to 1 in both places to enable demo widgets. Exit and save the file.

Copying the Demos and Examples Folders

In addition to configuring the lvconf.h file, it is also necessary to copy the demos and examples folders from the lvgl library directory to the SRC directory of lvgl. Otherwise, during compilation, the compiler will throw an error stating that lvdemos.h and lvxamples.h cannot be found. If the pre-packaged library is downloaded from the product page, the configuration is already taken care of and this step can be skipped.

Compiling and Uploading the Code

The next step is to compile and upload the code. To do this, the ESP32 terminal must be connected to a USB port on the computer. Once connected, the serial port should be visible. The baud rate should be set to 115200 and the reset button should be pressed to put the ESP32 terminal into download mode. After selecting the port and board type, the upload button should be clicked. The code will then be compiled and uploaded to the ESP32 terminal. Once the upload is complete, the LVGL demo should be running on the ESP32 terminal.

It beautiful.

Preparing the ESP32 Terminal

Before we can upload the LVGL demo code to the ESP32 terminal, we need to prepare the board for the task. This includes connecting the board to the computer, setting up the Arduino IDE, and downloading the necessary libraries.

Connecting the Board

The first step is to connect the ESP32 terminal to the computer using a USB cable. Once the connection is established, the board will be recognized by the computer and the Arduino IDE.

Setting up the Arduino IDE

Once the board is connected, we can open the Arduino IDE and configure it for the ESP32 terminal. To do this, we need to install the ESP32 board support package. This can be done by navigating to the board manager in the Arduino IDE and searching for the ESP32 package. Once the package is installed, we can select the ESP32 board from the board menu.

Downloading the Libraries

The next step is to download the necessary libraries for the LVGL demo code. This includes the LVGL library, as well as any other libraries that are required for the code to run. These libraries can be downloaded from the Arduino library manager or from the LVGL website. Once the libraries are downloaded, they need to be added to the Arduino IDE.

Compiling and Uploading the Code

Once the board is configured and the libraries are downloaded, we can compile and upload the LVGL demo code to the ESP32 terminal. To do this, we need to open the demo code in the Arduino IDE and select the correct board and port. Then, we can click the upload button to compile and upload the code to the board.

Testing the Code

Once the code is uploaded, we need to restart the board to see the effects of the uploaded code. To do this, we need to press and hold the boot button, then briefly press the restart button and finally release the boot button. Once the board is restarted, we can see the effects of the uploaded code.

Share.
Exit mobile version