

<feed xmlns="http://www.w3.org/2005/Atom">
  <id>https://bloomfield.online/</id>
  <title>Peter Bloomfield</title>
  <subtitle>A personal blog about software engineering and other geeky stuff.</subtitle>
  <updated>2023-08-02T12:51:49+01:00</updated>
  <author>
    <name>Peter Bloomfield</name>
    <uri>https://bloomfield.online/</uri>
  </author>
  <link rel="self" type="application/atom+xml" href="https://bloomfield.online/feed.xml"/>
  <link rel="alternate" type="text/html" hreflang="en"
    href="https://bloomfield.online/"/>
  <generator uri="https://jekyllrb.com/" version="4.3.2">Jekyll</generator>
  <rights> © 2023 Peter Bloomfield </rights>
  <icon>/assets/img/favicons/favicon.ico</icon>
  <logo>/assets/img/favicons/favicon-96x96.png</logo>


  
  <entry>
    <title>Make a digital dice using the ATOM Matrix</title>
    <link href="https://bloomfield.online/posts/make-a-digital-dice-using-the-atom-matrix/" rel="alternate" type="text/html" title="Make a digital dice using the ATOM Matrix" />
    <published>2021-07-16T16:14:47+01:00</published>
  
    <updated>2021-07-16T16:14:47+01:00</updated>
  
    <id>https://bloomfield.online/posts/make-a-digital-dice-using-the-atom-matrix/</id>
    <content src="https://bloomfield.online/posts/make-a-digital-dice-using-the-atom-matrix/" />
    <author>
      <name>Peter Bloomfield</name>
    </author>

  
    
  

  
    <summary>
      





      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 using the standard M5Atom library for Arduino.


ATOM Matrix dice showing the number 3. The attachment on the bottom is the “TailBat” battery.

Requirements

If you haven’t done so already, you’ll nee...
    </summary>
  

  </entry>

  
  <entry>
    <title>How to program ATOM Matrix and Lite with the Arduino IDE on Windows</title>
    <link href="https://bloomfield.online/posts/how-to-program-atom-matrix-and-lite-with-the-arduino-ide-on-windows/" rel="alternate" type="text/html" title="How to program ATOM Matrix and Lite with the Arduino IDE on Windows" />
    <published>2021-03-21T16:22:56+00:00</published>
  
    <updated>2021-03-21T16:22:56+00:00</updated>
  
    <id>https://bloomfield.online/posts/how-to-program-atom-matrix-and-lite-with-the-arduino-ide-on-windows/</id>
    <content src="https://bloomfield.online/posts/how-to-program-atom-matrix-and-lite-with-the-arduino-ide-on-windows/" />
    <author>
      <name>Peter Bloomfield</name>
    </author>

  
    
  

  
    <summary>
      





      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 good when I was getting started. In this post, I’ll document the steps which worked for me on Windows 10.

1. Drivers

At the time of writing, the documentation from M5Stack seems to say that you don’t...
    </summary>
  

  </entry>

  
  <entry>
    <title>How to write a good unit test</title>
    <link href="https://bloomfield.online/posts/how-to-write-a-good-unit-test/" rel="alternate" type="text/html" title="How to write a good unit test" />
    <published>2020-06-28T21:23:13+01:00</published>
  
    <updated>2020-06-28T21:23:13+01:00</updated>
  
    <id>https://bloomfield.online/posts/how-to-write-a-good-unit-test/</id>
    <content src="https://bloomfield.online/posts/how-to-write-a-good-unit-test/" />
    <author>
      <name>Peter Bloomfield</name>
    </author>

  
    
  

  
    <summary>
      





      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’re already an adept programmer. In this post, I’ll outline some of the key guidelines which I’ve found helpful for writing good unit tests.

BRIEF

A good unit test should be BRIEF:


  Brief
  Reliabl...
    </summary>
  

  </entry>

  
  <entry>
    <title>Report __cplusplus correctly with CMake and Visual Studio</title>
    <link href="https://bloomfield.online/posts/report-__cplusplus-correctly-with-cmake-and-visual-studio/" rel="alternate" type="text/html" title="Report __cplusplus correctly with CMake and Visual Studio" />
    <published>2020-04-12T11:05:30+01:00</published>
  
    <updated>2020-04-12T11:05:30+01:00</updated>
  
    <id>https://bloomfield.online/posts/report-__cplusplus-correctly-with-cmake-and-visual-studio/</id>
    <content src="https://bloomfield.online/posts/report-__cplusplus-correctly-with-cmake-and-visual-studio/" />
    <author>
      <name>Peter Bloomfield</name>
    </author>

  
    
  

  
    <summary>
      





      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 value, even if you’re explicitly using a modern C++ standard. This can occasionally cause some problems, such as libraries omitting certain API features.

Microsoft introduced the /Zc:__cplusplus compile...
    </summary>
  

  </entry>

  
  <entry>
    <title>Percent-sign in preprocessor definition breaks CMake Visual Studio generator</title>
    <link href="https://bloomfield.online/posts/percent-sign-in-preprocessor-definition-breaks-cmake-visual-studio-generator/" rel="alternate" type="text/html" title="Percent-sign in preprocessor definition breaks CMake Visual Studio generator" />
    <published>2020-01-07T18:47:00+00:00</published>
  
    <updated>2020-01-07T18:47:00+00:00</updated>
  
    <id>https://bloomfield.online/posts/percent-sign-in-preprocessor-definition-breaks-cmake-visual-studio-generator/</id>
    <content src="https://bloomfield.online/posts/percent-sign-in-preprocessor-definition-breaks-cmake-visual-studio-generator/" />
    <author>
      <name>Peter Bloomfield</name>
    </author>

  
    
  

  
    <summary>
      





      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 format string. The build worked on macOS using apple-clang/Xcode but it failed on Windows using MSVC/Visual Studio.

This is the CMake command which caused the problem:

target_compile_definitions(MyPr...
    </summary>
  

  </entry>

</feed>


