Live data from Hacker News

I dread writing embedded GUIs

blog.benjamin-cabe.com

11–20 of 58 posts

Re: I dread writing embedded GUIs

#12
On the contrary, I find writing embedded GUIs enjoyable. Sure, it's harder, but also very rewarding. You need an event queue, so you can handle internal and external events the same way. The rest is "just" programming.

Re: I dread writing embedded GUIs

#13
We've done real-time JavaScript UIs for several projects where the hardware is slick enough to host a REST API or a WebSockets server. It's worked well, making it easy to access devices from a kiosk browser or remotely. It also enables communication between devices across the same API layer, and by decoupling the UI from the application and control planes, it allows us to iterate super quickly with familiar tools.

Re: I dread writing embedded GUIs

#14
post #7

That post really resonated with me. I attempted making my own ESP32-based remote for controlling my media centre while I'm in my kitchen, or generally away from my laptop. The nature of embedded with interrupts (e.g. from buttons) and trying to mix in MQTT events and nice multi-layered UI made me completely question my programming abilities. I really wanted to have modals/pop-ups (e.g. to show current volume on chang…

We are definitely spoiled on modern systems. But imo, this convenience is unreasonably costly. It is baffling to me that modern devices with ghz clock rates can hardly render guis and websites responsibly. At the moment everyone swoons over the new M1 processors. Not too long and those performance gains will also be lost to costly abstractions and badly written code. I'm not very optimistic this will change in the near future.

Re: I dread writing embedded GUIs

#16
So how many embedded GUIs did the author actually write?

He seems to have compiled an arbitrary list of 'hard things' or 'problems you may encounter'. But these are presented so shallow, I find it hard to believe he ever struggled with them.

Although he seems to push the opensource Renode at the end, I feel it is mostly an Azure submarine.

Re: I dread writing embedded GUIs

#18
post #10

For small systems, LVGL address all of these pain points. It works well with small amounts of memory, maintains a responsive, animatable UI that works over slower display interfaces, and is easy to port with only a small amount of driver code needed to get up and running.

I second that. After decades of rolling stuff by hand I recently did a project based on LVGL. It's highly configurable, easy on the resources, properly documented and all. I had some troubles with getting the layout to do what I want, but with the latest release that has been solved with the new CSS-like layouting mechanism. Recommend, would use again. https://lvgl.io/

That looks amazing. Thanks for the resource.

Re: I dread writing embedded GUIs

#19
Unless the use cases are very simple or there's a special reason not to for most embedded devices I think I'd rather communicate largely with an app (e.g. by bluetooth).

I'm thinking for washing machines, dishwashers, aircon, things like that.

Unless simple, embedded UIs are usually bad and usually make complex interactions (e.g. setting timers) especially horrible. Whereas android/apple/the web have been optimized for UX.

It's oddly not as common as I'd have expected, though.

Re: I dread writing embedded GUIs

#20
my takeaway from the article is I hope OP isn't responsible for that lag fest of an animation[0]. I hate embedded stuff that takes ages to animate while the hardware obviously just can't handle it. Skip the animation, and just make it snappy, damn it! There's nothing more infuriating than a slow interface that makes you wait needlessly.

[0] https://blog.benjamin-cabe.com/wp-content/uploads/2021/10/re...

Post reply on HN