Skip to content
Menu
Klein Embedded
  • About
Klein Embedded
June 30, 2022August 31, 2022

Project Smart Greenhouse (Part 1): The idea

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!

Read More
May 31, 2022August 28, 2022

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”.

Read More
April 27, 2022August 28, 2022

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…

Read More
March 29, 2022September 1, 2022

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!

Read More
February 26, 2022August 28, 2022

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.

Read More
January 8, 2022February 26, 2022

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.

Read More
December 29, 2021August 28, 2022

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?

Read More
  • Previous
  • 1
  • 2

Subscribe to the newsletter

Get notified by email when a new blog post is published.

Check your inbox or spam folder to confirm your subscription.

Recent Posts

  • Adding right-click context menu items in Windows 10
  • CI/CD with Jenkins and Docker
  • STM32 without CubeIDE (Part 3): The C Standard Library and printf()
  • Understanding the (Embedded) Linux boot process
  • Calling C code from Python

Recent Comments

  1. Kristian Klein-Wengel on STM32 without CubeIDE (Part 3): The C Standard Library and printf()
  2. Milos on STM32 without CubeIDE (Part 3): The C Standard Library and printf()
  3. otann on STM32 without CubeIDE (Part 1): The bare necessities
  4. Ricci on STM32 without CubeIDE (Part 2): CMSIS, make and clock configuration
  5. Ricci on STM32 without CubeIDE (Part 2): CMSIS, make and clock configuration

Archives

  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021

Categories

  • C++
  • DevOps
  • DSP
  • Electronics
  • Embedded C
  • Embedded Linux
  • Firmware
  • Project
  • Python
  • Software Design
  • Testing
  • Tutorial
  • Uncategorized
©2025 Klein Embedded