Examples for LVGL
Here you can find examples and demos for the LVGL embedded GUI library.
Add the examples to your projects
- Clone this repository:
git clone https://github.com/lvgl/lv_examples.git.
lv_examplesdirectory should be next to the
lvgldirectory in your project.
lv_conf.h there is a configuration file for the examples too. It is called
- Rename it to
- Change the first
#if 1to enable the file's content
- Enable or Disable modules
If you are new to LVGL check these examples first. They demonstrate the basic mechanisms of the library. See the lv_ex_get_started folder. You can also take a look at the Quich overview of LVGL to learn the basics.
LVGL has a powerful and versatile style system. These examples show how to use the most common style properties, e.g. styling rectangles, shadows, images, lines, transitions and so on. See the lv_ex_style folder. Be sure to read the Documentation of the styles to fully understand them.
Shows how the widgets look like out of the box using the built-in material theme. See in lv_demo_widgets folder.
The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL. It works the best with display with 480x272 or 272x480 resolution.
See in lv_demo_music folder.
A printer example created with LVGL. This demo is optimized for 800x480 resolution and among many others, it demonstrates custom theme creation, style transitions, and animations. See in lv_demo_printer folder.
Keypad and encoder
LVGL allows you to control the widgets with a keypad and/or encoder without a touchpad. This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches, and text inputs without touchpad. Learn more about the touchpad-less usage of LVGL here.
See in lv_demo_keypad_encoder folder.
A demo to measure the performance of LVGL or to compare different settings. See in lv_demo_benchmark folder.
A stress test for LVGL. It contains a lot of object creation, deletion, animations, style usage, and so on. It can be used if there is any memory corruption during heavy usage or any memory leaks. See in lv_demo_stress folder.
For contribution and coding style guidelines, please refer to the file docs/CONTRIBUTNG.md in the main LVGL repo: https://github.com/lvgl/lvgl