Sounds like a good idea! I originally read this thinking probably not, but when scouring the internet, it could be possible...
LVGL has the following system requirements that could be a make-or-break deal:
With the Pixl.js (which would be ideal given that it has a display), it's probably not possible: iirc you're given around 40 KiB to play with when the Espruino firmware/interpreter is installed. With some of the non-Bluetooth boards, I believe that they have a much higher spec, so it probably could fit on a few of the other Espruino products.
As you say, you'd have to port the code over to Espruino, which would require quite a lot of effort since it's probably a top-down rewrite of over roughly 383,002 source lines of code (according to a Chrome extension I installed for GitHub), so pretty big task. By no means impossible though ─ LVGL would only make up around 14% of the Espruino source code if both codebases were merged!
I admit that I'm not an expert at writing C myself (more of a JS guy ─ I've only written a bunch of small C programs!), but it sounds like an interesting project for those who have more experience at C. Defo a pl that I want to learn since it's so interesting, anyway!
One thing that would work is just using Espruino's own UI library ─ I mean, you can't go wrong there! I haven't used it myself (I implemented my own basic UI library for a project I've been working on), but it seems to be somewhat powerful given the limitations of the Espruino hardware. It works on the Espruinos with screens, and that includes the Pixl.js if you have one, as well as some of the other boards.
Hope this helps!
© Espruino, powered by microcosm.
Report a problem