The CircuitPython code for the Thermal Camera project is contained in four files:

  •, the main code module,
  • the temperature unit conversion helper,
  • (in the index_to_rgb folder), the iron pseudocolor spectrum conversion helper, and
  •, the start-up default parameter file.

Code Details

Let's take a walk through the code and look in more detail how each section works starting with

The main module,, prepares and operates the Thermal Camera. It consists of the following major sections:

  • Import and Initialize: Libraries, Devices, and Welcome Screen
  • Constants: Display, Min/Max, and Alarm Threshold Values
  • Helpers: Display, Interpolate, Joystick, and Setup Functions
  • Display: Define Group Layers
  • Primary Process: Setup and Loop

Things are started with importing libraries, establishing devices, and saying hello, all of which are described on the following pages.

Because of changes to ulab starting with the release of CircuitPython 7.x.x, the thermal camera code is not compatible with earlier CircuitPython versions.

This guide was first published on Jun 09, 2021. It was last updated on Jul 16, 2024.

This page (CircuitPython Code Details) was last updated on Mar 08, 2024.

Text editor powered by tinymce.