5 ms·
Lvgl: Embedded graphics library to create beautiful UIs
- karmicthreat 2y agoIt's fairly nice just to build a simple embedded UI. There is also a useful editor now, though I haven't used it. It was implemented as a stand-alone program, I would have preferred a VSCode plugin. It can be a bit difficult to get going on a specific platform, but once you have it going, it's smooth sailing.
- transpute 2y agoPoC from shell scripts with Linux framebuffer, https://github.com/rzr/dialog-lvgl https://github.com/rzr/dialog-lvgl
- kunjanshah 2y agoAny one have experience with this and inkplate EPDs?
- nabilt 2y agoIf you just want a simple UI editor and don't want to pay for the official tool, give GUI Glider from NXP a try. https://www.nxp.com/design/design-center/software/development-software/gui-guider:GUI-GUIDER https://www.nxp.com/design/design-center/software/developmen...
- einpoklum 2y agoNot well-versed in graphics libraries, but - isn't this reinventing the wheel? I mean, aren't there several others C GUI libraries/toolkits already?
- echoangle 2y agoWhich ones do you have in mind? This is a very low level embedded GUI library when you have a screen where you just set pixel colors or can draw some primitives like lines. This is not something you would use to program a GUI program running in a real desktop OS.
- Const-me 2y ago> This is not something you would use to program a GUI program running in a real desktop OS Indeed. In addition to that, I think that library is less than ideal for chips with an integrated 3D graphics hardware, like ARM Mali. Except applications with very low-resolution screens way below 1 megapixel, in which case CPU software rendering should be fine.
- 0x0203 2y agoFor what it's worth, I've used it on a real "desktop os" albeit on the framebuffer to make a couple full screen (1900x1200 resolution) applications and it worked really well. Biggest issue is lack of native support for multiple mouse buttons, but it was easy to hack that in myself. You can run it under sdl in a regular windowing desktop environment too, but as stated, that's really not what it's best suited for. It's really meant for the small embedded stuff, for which I personally think it's excellent. I also thought they were trying to make it capable of talking advantage of some of the accelerated graphics capabilities on some of the small/embedded boards (nxp maybe?), but it's been a while since I was paying attention and I'd have to dig through the GitHub issues/posts again.
- thamer 2y agoThe main alternative to LVGL seems to be TouchGFX[1], at least that's the one I've seen mentioned the most in conversations around UI libraries for microcontrollers. As you wrote these aren't made for desktop apps, but you can use desktop apps to help with UI development using these libraries. For LVGL there's SquareLine Studio[2], I used it a few years ago and it was helpful. For TouchGFX there's TouchGFXDesigner[3], I haven't used it myself and it seems to run only on Windows. [1] https://touchgfx.com/ https://touchgfx.com/ [1] https://squareline.io/ https://squareline.io/ [2] https://www.st.com/en/development-tools/touchgfxdesigner.html https://www.st.com/en/development-tools/touchgfxdesigner.htm...
- amelius 2y ago> A fully portable C (C++ compatible) library with no external dependencies. How does it interact with the screen then?
- pmalynin 2y agohttps://docs.lvgl.io/master/details/integration/adding-lvgl-to-your-project/connecting_lvgl.html#display-interface https://docs.lvgl.io/master/details/integration/adding-lvgl-...
- amelius 2y agoOk, so I take from this that it uses pixel buffers directly, and has no opengl support (which would allow GPU acceleration).
- necubi 2y agoThis appears to be for low-power embedded devices, not anything that would have a GPU
- mncharity 2y agoRenderer[1] Draw Units[2] include various GPUs, SDL (and thus OpenGL; looks like SDL2), and a direct OpenGL ES seems in progress[3]. [1] https://docs.lvgl.io/master/details/integration/renderers/index.html https://docs.lvgl.io/master/details/integration/renderers/in... [2] https://docs.lvgl.io/master/details/main-modules/draw.html#draw-units https://docs.lvgl.io/master/details/main-modules/draw.html#d... [3] https://github.com/lvgl/lvgl/issues/6763#issuecomment-2623190639 https://github.com/lvgl/lvgl/issues/6763#issuecomment-262319...
- thamer 2y agoThis is for screens usually controlled by microcontrollers, nothing running close to an operating system like Linux and rarely coming with a GPU. See for examples ILI9341 or SSD1306 displays[1] or integrated boards with (often) an ESP32 microcontroller and a display attached[2]. [1] displays: https://www.google.com/search?q=SSD1306+OR+ILI9341+display&udm=2 https://www.google.com/search?q=SSD1306+OR+ILI9341+display&u... [2] integrated: https://www.aliexpress.us/w/wholesale-ESP32-LVGL.html?spm=a2g0o.productlist.search.0 https://www.aliexpress.us/w/wholesale-ESP32-LVGL.html?spm=a2...
- throwaway290 2y agoHow does it compare to a generic lib like Dear ImGui? Imgui is tiny and well suited for embedded. Blazing fast
- Rohansi 2y agoDear Imgui is immediate mode and primarily designed for rendering with a 3D-capable GPU. LVGL is retained mode and designed for running on microcontrollers where there is no GPU available.
- ashishb 2y agoWhat's a good library like this for building web-only UI? I'm looking for something higher level than react/vue etc. I'm looking for something that produces small standalone JavaScript/CSS files that I can embed in a static website.
- wruza 2y agoLooking at the examples, $subj is a classic retained-mode gui, just like Qt, GTK, Wx, Tk, FLTK, MFC, VCL, App/UIKit and so on. Widget tree and methods and event callbacks. DOM is also that, although a little crappier in some parts. You want to document.createElement(), el.setAttribute(), el.appendChild(), el.addEventHandler(). This obvious interface got buried under the all-consuming react dogma, but it's still there. jQuery and alikes (zepto, umbrella, cash) can help with wordiness and just stupidly rough DOM signatures, but they don't shift the paradigm. Edit: If you want a "ready to use" widget hierarchy that simulates desktop paradigms, interrogate llms about modern ExtJS alikes. It was the closest thing, afaik.
- deleted 2y ago[deleted]
- whitehexagon 2y agoI was using LVGL (8.3.3) some time ago with Zig/WASM/PinePhone, following these great NuttX series of articles by Lup Yuen: https://lupyuen.github.io/pinephone-lvgl-zig/ https://lupyuen.github.io/pinephone-lvgl-zig/ I just recently returned to Zig, and started porting the build file (zig cc calls) to latest Zig (build.zig), but struggling to compile the C LVGL to WASM I suspect because LVGL has a few dependencies on standard C bits n bobs, and I cant find a way to reference the C header files needed. Anyway, just to say that I found the simplicity of LVGL a breath of fresh air. When I first looked at the PinePhone I was struggling to work out how to access the Mali GPU, thinking I'd be doing UI via OpenGL ES. But seeing how well LVGL and the simple frame-buffer approach works, I abandoned that approach all together. Thanks lupyuen! It is also nice having the UI in WASM for iterative development without the slow deploy to phone hardware. I was also able to simply extend an LVGL widget to show a 32bit register contents for debugging my SoC work. A huge time saver. So a big thanks to the LVGL team on the library, and especially the detailed documentation and examples.
- rollcat 2y agoThere was a thread the other day about Forth on 6051, and someone challenged Forth's utility. I think it fits the same niche: enables quick iteration, exploration, while maintaining a "just right" level of abstraction over the bare metal. If you want to build something, step 1 is always: empower the developer.
- androiddrew 2y agoLVGL works with Micropython! Ok disclaimer don’t use the official port it is not good. There is another port https://github.com/lvgl-micropython/lvgl_micropython https://github.com/lvgl-micropython/lvgl_micropython that has a better setup. I already have it working with custom fonts, and surprisingly Claude can do a reasonable amount of troubleshooting if you get stuck on the API
- jeremyjh 2y agoIs "Embedded graphics library" really ambiguous? People in this thread asking about web UIs, GPUs, etc really confuse me. What are they responding to, exactly?
- snuxoll 2y agoI’ve used it to make a UI for an ESP32 with one of those tiny B&W OLED displays, it happens to scale up from there as well.