Open-source Embedded GUI Library
LittlevGL is a free and open-source graphics library providing everything you need to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint.
Powerful building blocks buttons, charts, lists, sliders, images etc
Advanced graphics with animations, anti-aliasing, opacity, smooth scrolling
Various input devices touch pad, mouse, keyboard, encoder etc
Multi language support with UTF-8 encoding
Fully customizable graphical elements
Hardware independent to use with any microcontroller or display
Scalable to operate with little memory (80 kB Flash, 10 kB RAM)
OS, External memory and GPU supported but not required
Single frame buffer operation even with advanced graphical effects
Written in C for maximal compatibility (C++ compatible)
Simulator to start embedded GUI design on PC without embedded hardware
Tutorials, examples, themes for rapid GUI design
Documentation online and offline
Free and open-source under MIT licence
Powerful graphical objects
LittlevGL is a complete graphic framework where you don't need to think about drawing of primitive shapes. You can build your GUI from easy-to-use building blocks instead like buttons, charts, images, lists, sliders, switches, keyboard and so on.
See all the Object types or check out the Live demos.
Engaging graphics
In the world of smart phones users want to see state-of-the-art, innovative user interfaces even on the display of embedded devices.
Using LittlevGL your embedded GUI will impress your customers with smooth animation, opacity, shadows and anti-aliasing.
All these with only one frame buffer and 10..20 kB RAM (without double buffering). It might eliminate external RAM to keep your PCB simple with a cheaper microcontroller.
Themes to speed up embedded GUI design
You can customize the objects one-by-one but it's much faster and easier use a theme!
You will find a matching theme for GUIs in Industry, Instruments, Smart home, Health care or anything else.
Check All the existing themes or Try them online.
LittlevGL in the practice
The LittlevGL API is simple and clean. Look how easy it is to create a button and a label on it. To learn more check the Documentation or the Tutorial
The result of the code example:
/*Add a button*/
lv_obj_t * btn1 = lv_btn_create(lv_scr_act(), NULL); /*Add to the active screen*/
lv_obj_set_pos(btn1, 10, 10); /*Adjust the position*/
lv_btn_set_action(btn1, LV_BTN_ACTION_CLICK, my_click_action); /*Assign a callback for clicking*/
/*Add text*/
lv_obj_t * label = lv_label_create(btn1, NULL); /*Put on 'btn1'*/
lv_label_set_text(label, "Click me"); /*Modify the label's text*/
Try the TFT simulator on PC
A Littlev Graphics Library based GUI can run in a simulator on your PC. Hence you can try the graphics library and begin the embedded GUI design and development without any PCB, microcontroller or TFT display.
Runs on Windows, Linux and OSX as well. Learn more here.
Open-source C code
The graphics library is written in C to run in any embedded system: Microcontroller or Single Board Computer with ARM Cortex M or A, Intel, AMD or MIPS core from STM, NXP, Microchip, Freescale etc.
The graphic library hosted on GitHub as a free and open-source software. But LittlevGL needs your support to keep it free and bring new features! If you like it please Support its development with a few dollar!
LittlevGL Arduino library
This library allows to use LittlevGL as an Arduino library. Library can be installed via Arduino IDE Library Manager or as an .ZIP library.
Example
There is simple example which uses https://github.com/Bodmer/TFT_eSPI library as an TFT driver to simplify testing. To get all this to work you have to setup TFT_eSPI to work with your TFT display type via editing the
User_Setup.h
file in TFT_eSPI library folder, or by selecting your own configurtion in the User_Setup_Select.h
file in TFT_eSPI library folder.
LittlevGL library has its own configuration file in
lv_conf.h
file, which is locatd in LittlevGL library folder. Please get in mind to check that corresponding resolutions in LVGL configuration match the ones in TFT_eSPI and with physical resolution of your display.
Example result should look like this:
Tested with:
- My own ESP32 board, module ESP32 Wroom
- PC OS: Linux, Ubuntu 16.04 LTS
- IDE: Arduino IDE 1.8.8
- ESP32 Core: 1.0.1
Debugging
In case of trouble there are debug information inside LVGL. In the
ESP32_TFT_eSPI
example there is my_print
method, which allow to send this debug information to the serial interface. To enable this feature you have to edit lv_conf.h
file and enable logging in section log settings
:/*Log settings*/
#define USE_LV_LOG 1 /*Enable/disable the log module*/
#if USE_LV_LOG
/* How important log should be added:
* LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
* LV_LOG_LEVEL_INFO Log important events
* LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't caused problem
* LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
*/
# define LV_LOG_LEVEL LV_LOG_LEVEL_TRACE
After enabling log module and setting LV_LOG_LEVEL accordingly the output log is sent to he
Serial
port @ 115200 Bd. After each line sent there is 100ms delay to allow the serial transfer to finish. This delay can be commentd out in my_print
method.
0 comentarios:
Publicar un comentario