I have enjoyed gardening as a hobby for the past few years and I have two raised vegetable beds in our front yard. This year I decided to buy a greenhouse! Although I enjoy keeping a vegetable garden and watching my plants grow, constantly tending to the plants can become quite a chore. So as an engineer, of course I have to build something to facilitate the process a bit. Cue the Smart Greenhouse!
Developing and publishing a full-fledged Python package
I have recently been working on some Python code for interacting with an embedded device from a PC, e.g. setting and reading configuration parameters, reading measurements and doing firmware upgrades. The device uses our own communication protocol, for which we have already accumulated quite a few Python scripts. However, this protocol is used both for our main product as well as several customer projects, so we are looking to make the code a bit more “release-ready”.
C++ and STM32CubeMX code generation
I spend most of my time writing C code for STM32 microcontrollers. I have recently considered writing more code in C++, mainly for easier implementation of various design patterns and especially for using abstract classes for dependency injection when writing testable modules/classes. However, when using STM32CubeMX to generate hardware initialization code, there is no option…
Unit testing in STM32CubeIDE with GoogleTest
Unit testing has become an essential part of developing high-quality, reliable and maintainable software, but is not as commonplace in the firmware industry as it ought to be. If you are tired of being slowed down by the “build-flash-debug” style of development, waiting for hardware or having to share hardware with several other coworkers, then off-target unit testing and test-driven development is for you!
Interfaces in C
Interfaces are an extremely useful tool to develop loosely-coupled, testable software. In the embedded world it will even allow us to write firmware and run it on our development PC instead of the actual hardware, which may be scarce or not even produced yet.
Multiple instances of a module in C
When writing modules for your application, sometimes it might be enough to have just a single instance of the module (e.g. a global “logging” module), but oftentimes you will need to create multiple instances of a module (e.g. a “queue” module). In this article I will take a look at various ways to implement this in C.
The ‘volatile’ qualifier
When programming embedded systems in C, you will most likely have stumbled upon the volatile keyword in a variable declaration. But what does this actually mean – and when should you use it?