This project provides resources and examples to build a Control Center using the LVGL library on a TFT display with ILI9341 controller (320x240) and touchscreen capability. The interface is designed for monitoring and controlling devices in both home and factory environments, utilizing UDP communication for efficient interaction.
- Convinient and user-friendly interface with LVGL on TFT display.
- Monitor and control devices remotely through UDP connection.
- Support both home and factory environments.
Contains the program that uses UDP to receive signals to control the LED from the TFT.
Contains the Python program that can send and receive data with ESP32 via UDP.
- Directory
AsyncUDPServer: Contains the example program for UDP communication between ESP32 devices. - Directory
demo_flash_png: Contains the example program for displaying images on the TFT screen. - Directory
demo_touch_screen: Contains the example program for touch interaction on the TFT screen. - Directory
ui_project_1_lvgl_v8-3-6: Contains the example program for building a user interface with version LVGL v8.3.6. - Directory
ui_project_1_lvgl_v9-1-0: Contains the example program for building a user interface with version LVGL v9.1.0.
- Directory
libraries: Contains the necessary libraries for the project. - Directory
Source_code: Contains all the source code of the project.- Directory
main: Containsmain.ino(used with Arduino IDE to upload the program to ESP32). - Directory
Squareline_compiled_code: Contains the compiled files exported from Squareline Studio.
- Directory
- Directory
Squareline_saved: Contains the design files created with Squareline Studio (use Squareline Studio to view and edit the project).
Follow these steps to set up LVGL in your project:
Start by obtaining the LVGL library from its GitHub repository: LVGL GitHub Repository
You can clone it using git clone: https://github.com/lvgl/lvgl.git
Alternatively, download lvgl 8.3.6 version compatible with Squareline 1.4.0 in my this repository LVGL My Repository. It has been calibrated and can be used immediately without step to Configuration
LVGL provides a configuration header file named lv_conf.h. Customize this file to set LVGL's behavior, disable unused modules, adjust buffer sizes, etc.
- Copy
lv_conf_template.hfrom the LVGL directory, rename it tolv_conf.h. - Change
#if 0to#if 1inlv_conf.hto enable its content. - Customize the configuration options as needed. Comments in the file explain their meanings.
To use LVGL effectively, follow these initialization steps:
- Call
lv_init()to initialize LVGL. - Initialize your display and input drivers.
- Register the display and input device drivers in LVGL.
- Call
lv_tick_inc(x)everyxmilliseconds in an interrupt to report elapsed time to LVGL. - Call
lv_timer_handler()every few milliseconds to handle LVGL-related tasks.
-
Prerequisites: Make sure you have installed Squareline and have set up the development environment for working with TFT display and LVGL library.
-
Clone Repository: Clone this repository to your computer.
git clone https://github.com/minzdat/LVGL-ILI9341-ControlCenter.git -
Run Examples: Open the examples in Squareline. Select
examples->ui_project_1_lvgl_v8-3-6->Squareline_saved->ui_demo_lvgl.spj
-
Customize and Develop: Customize the interface and add new features according to your needs, and contribute to this project if you'd like.
-
Execute Options: Choose
File->Project Settings-> Set FILE EXPORT according to the following reference
- Complete: Choose
Export->Export UI Files. Then navigate to the path as set in FILE EXPORT to view the project results
For a comprehensive step-by-step guide on setting up and developing the LVGL-ILI9341-ControlCenter project, please refer to the file Huong dan chi tiet xay dung du an.
If you'd like to contribute to this project, please create a pull request and we'll review and integrate your improvements into the project.
Thank you for your interest in this project! All contributions and feedback are highly appreciated.





