Home Software Hardware Misc About

digitherm

vs. 0.1 (2020)

This is an application that shows the current temperature on a Raspberry Pi, and it's humbly called digitherm. I wrote this one to use a seven segment control to show temperature readings. It's written in wxPython and uses Timo Furrer's w1thermsensor to read the temperature data.

The code is also another useful example on how to use several SevenSegmentDisp controls to control a display with multiple digits. Both the GUI code and the sensor code run in different processes (as they should), and for extra fun the ICP is achieved by means of a queue managed by a timer and a thread. Highly entertaining and useful.

As for the hardware setup, I just followed the pretty straightforward instructions on Timo's pypi page. I used a DS18B20 sensor (the 'waterproof' kind) with a 4.7kΩ resistor just like these (photo credits to Adafruit Industries), an old audio CD player cable, old connectors and a small universal PCB to connect everything to the Raspberry Pi.

Click here to download digitherm. Save it somewhere and test it, running from a terminal where you saved using

python3 digitherm.py

Tested on wxPython 4.1.0 (gtk3) on Python 3.7.3 on Raspberry Pi OS. I used w1thermsensor vs. 1.3.0 installed with

sudo apt-get install python3-w1thermsensor

Distributed under the BSD-3-Clause License.