LittlevGL is a nice open source graphics library for generating graphical user interfaces (buttons, sliders, graphs and so forth) on microcontrollers. It provides most of the UI “smarts” behind the scenes, but on its own doesn’t communicate with any specific display or input device. Instead, one normally must write their own intermediary code to tie these together.
We’ve made an Arduino library — Adafruit_LvGL_Glue — that simplifies the task of sticking LittlevGL on many Adafruit displays: PyPortal, TFT FeatherWings, and most other Adafruit devices with (or connected to) a color TFT or OLED screen, using fast DMA transfers when possible. Touchscreens can be used for responsive interfaces. For non-touch displays, LittlevGL can still be useful for its nice graphing and text display capabilities. Mostly, though, we think this will shine on Adafruit PyPortal devices, with their extra fast displays and touch sensitivity.
The following microcontrollers are supported: SAMD51 (“M4”), nRF52840 and ESP32. More 32-bit devices might get added in the future. SAMD21 (“M0”) may work for very simple LittlevGL tasks, but generally isn’t recommended. And LittlevGL vastly exceeds the capabilities of 8-bit AVR devices (such as Arduino Uno), so don’t hold out for support there.
This guide is not an extensive tutorial into LittlevGL. We’ll get things set up on Adafruit hardware and run a basic “hello world” type of demo. Going forward from there, you’ll find explanations and examples on the LittlevGL documentation site and elsewhere. Many existing examples can be copied-and-pasted with only minor changes needed!
Text editor powered by tinymce.