In the previous post, I covered the low-level LCD driver and PC simulation. Now it's time for the last big piece: the high-level GUI.
I was searching for an open-source library for small embedded projects that would:
- Provide GUI elements like buttons, menus, and selection lists.
- Support proportional fonts (not fixed-width like fonts in PC terminals). They look much better on an LCD.
I could write the code for this myself, but it would be limited (because it's a lot of work) and not as aesthetic or powerful for the user. Also, layout rendering isn't something that really interests me, so a library is a much better solution. And I found one!
The library is muimanual, which is part of the popular u8g2 library. I’ve never used it before, but from what I see, it provides great support for various displays and boards. If you have an Arduino or another project with a display and buttons, you should definitely give it a try!
Here’s an example of the GUI (the image is from its Git page):

One disadvantage is that it’s a monochrome library. However, I think I can find some workarounds. Even if not, it’s still better than writing something half-baked myself. I’d prefer a good monochrome GUI over a poor one with color support.
As usual, I’ve made a diagram to visualize how it works (or rather, how it will work once everything is done):

- St7735DisplayDriver will glue together all low-level aspects (HAL usage and the LCD display library).
- Display will act as a bridge, providing muimanual and u8g2 with the LCD API they need to draw the GUI.
- "User Defined Layouts" will be a high-level collection of classes for displaying various layouts.
I'm working on gluing this all together; hope it works well.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.