Home
Peter Bloomfield
Cancel

Make a digital dice using the ATOM Matrix

The ATOM Matrix includes a built-in 5x5 pixel RGB display, and the whole body acts as a button. This makes it great for acting as a digital 6-sided dice. In this post, I’ll show you how to do that ...

How to program ATOM Matrix and Lite with the Arduino IDE on Windows

The ATOM Matrix and ATOM Lite are fun little ESP32-based development kits from M5Stack. They can be programmed from the Arduino IDE, although the official instructions for doing that weren’t very g...

How to write a good unit test

When used correctly, unit testing can be valuable for ensuring the long-term quality and correctness of your code. However, it’s a skill which can take time and discipline to do well, even if you’r...

Report __cplusplus correctly with CMake and Visual Studio

Some C++ projects use the _cplusplus predefined macro to determine which language features the compiler supports. However, by default, the Microsoft Visual C++ compiler still reports a very old val...

Percent-sign in preprocessor definition breaks CMake Visual Studio generator

I recently found a minor but frustrating problem while working on a cross-platform C++ project. In my CMake configuration file, I was trying to declare a preprocessor definition containing a date f...

Path error when building with Conan and CMake

I recently encountered a mysterious path error when attempting to build a C++ project on Windows using Conan and CMake. The main error message wasn’t particularly helpful though: ERROR: conanfile....

Workaround for nvcc pthread issue

I recently upgraded various pieces of software on my work PC. Afterwards, I found that our C++/CUDA projects wouldn’t build. The following error was reported: nvcc fatal : Unknown option 'pthread'...

Importing email folders into Gmail

Google has some useful documentation about importing emails into Gmail via POP. However, the instructions don’t work very well if the messages in your old account are organised into folders. You wi...

Why Python 3 doesn't write the Unicode BOM

I’ve been using Python scripts to automatically edit and output Windows Resource files (.rc) for C++ projects in Visual Studio 2013. When handling Unicode, Windows and Visual Studio always want lit...

Output file encoding in Python 3

Unicode is very widespread now (for good reason), and one of the great benefits of Python 3.x is that it handles Unicode natively. There are different ways to represent Unicode though, so how do yo...