What is the purpose of the C++ qualifier volatile
, what does it have to do with race conditions, and what are Heisenbugs?

Everything about programming
What is the purpose of the C++ qualifier volatile
, what does it have to do with race conditions, and what are Heisenbugs?
The featured image of this post is by Thomas from Pixabay.
What can you do to connect many I2C devices with the same device address to an MCU? Most often, the advice is to use hardware solutions. Here, we will look at how to solve the problem with software employing the FlexWire library.
Continue readingThe featured picture of this blog post is by user18526052 on Freepik.
The Wire library is the one that connects your Arduino to sensors and actuators that communicate using the I2C protocol. Unfortunately, this library has a lot of shortcomings, and often you want to replace it with a different I2C library. Replacing the Wire library on a per-sketch basis turns out to be more complicated than one would expect. In this blog post, I describe an easy way to accomplish that.
Continue readingThe featured image of this post is based on a picture by TheDigitalArtist on Pixabay.
Link-time optimization (LTO) is a very powerful compiler-optimization technique. As I noticed, it does not go very well together with debugging object-oriented programs under GCC, at least for AVR MCUs. I noticed that in the context of debugging an Arduino program, and it took me quite a while to figure out that LTO is the culprit.
Continue readingAlthough the typical Arduino programmer is probably not interested in writing assembly code, in some situations assembly programming is essential. Let’s have a look at these situations and see what one can do.
Continue readingCopyright © 2025 Arduino Craft Corner
Theme by Anders Noren — Up ↑