Writing An OLED Display Driver In MicroZig

Although most people would use C, C++ or MicroPython for programming microcontrollers, there are a few more obscure options out there as well, with MicroZig being one of them. Recently [Andrew Conlin] wrote about how to use MicroZig with the Raspberry Pi RP2040 MCU, showing the process of writing an SSD1306 OLED display driver and running it. Although MicroZig has since published a built-in version, the blog post gives a good impression of what developing with MicroZig is like.

Zig is a programming language which seeks to improve on the C language, adding memory safety, safe pointers (via option types), while keeping as much as possible of what makes C so useful for low-level development intact. The MicroZig project customizes Zig for use in embedded projects,  targeting platforms including the Raspberry Pi MCUs and STM32.  During [Andrew]’s usage of MicroZig it was less the language or supplied tooling that tripped him up, and more just the convoluted initialization of the SSD1306 controller, which is probably a good sign. The resulting project code can be found on his GitHub page.

7 thoughts on “Writing An OLED Display Driver In MicroZig

    1. Its a different kind of mindset I think. I (and I’m guessing you) look at programming languages purely as tool to accomplish a job. But I think just like real life, there are tool enthusiasts, people who get excited over the latest drill or grinder or chainsaw model, I guess its the same with programming languages, people who like and appreciate the tools as well.

      Me, I just care about making the code do what I want, I don’t want it to be clever or simple, efficient or slow. If the job requires me coding in assembly, so be it.

    1. I really think most of these new languages will naturally start catering to a niche and settle down in it.

      Go is specifically good for writing multithreaded networking applications I hear, Rust is memory safe so safety critical software (their syntax is really intimidating though, it looks like an unterminated string memory leak)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.