Close

Integrating MUIManual and U8G2: Testing in Simulation OK

A project log for Hardware Data Logger

Easily extendable data logging platform featuring STM32F103RBTx, WiFi, microSD storage, LCD with four buttons, UART, and pulse counters.

robert-gawronRobert Gawron 12/12/2024 at 16:100 Comments

I have integrated two libraries into the project:

The code is messy, but it works (kind of).

These libraries offer many useful features, which will save a lot of development time.

Understanding how these libraries work was quite challenging! They are memory-optimized and use the concept of "tiles." This means they don’t maintain a buffer for the entire screen. Instead, they calculate updates for an 8x8 pixel tile of the display and then move to the next tile until the entire screen is updated. To make things more complex, the tiles may be updated in either horizontal or vertical order. It took considerable effort to grasp how this works and how to decode it to display content on the screen.

Testing was conducted on the PC simulator for the device (the simulator was presented in previous posts), and it works! This allows me to develop all layout-related code without requiring the actual device (which is great because, in the actual HW version, the display doesn’t work.). Below is an example:

This is a "Hello World" example from the MUIManual tutorial, adapted to the project. The "select me" text is more than just a rectangle; it represents a button (button on the screen, of course :)). The button is interactive and can be "pressed" because it can be linked to real hardware button.

Additionally, I created a sequence diagram to visualize how this process works.

This is a working version that is subject to change. With MUIManual, I think I might be able to remove the "Controller" and "View" classes since these features are already provided by the libraries. That would be great because it would simplify the project (less code to manage). However, it could also be problematic, as it would tie the project strictly to these libraries, making it harder to replace them in the future.

PS: This project currently has 120 followers, which feels like a lot and makes me very happy. Thank you all for your interest!

Discussions