Loading files…
This project implements a thermometer to measure and log temperature. The initial implementation uses a graphical user interface on a display such as the Official Raspberry Pi 7" touchscreen. It measures temperature using an Adafruit RTD Sensor Amplifier to read a PT100 RTD.
This software uses a custom Raspberry Pi Hat to connect the temperature sensor to the Raspberry Pi. The schematic for the hat is documented using KiCAD; it is available for Linux, MacOS, and Windows. The KiCAD files are in a sub-folder named Temperature Logger Hat. Note that the circuit diagram is for an older RTD Sensor amplifier board; it has a different connector but uses the same amplifier chip.
Clone the project repository from github:
git clone https://github.com/jmgrady/rpi-thermometer
Create a Python virtual environment
Install the required packages from apt:
sudo apt install python3-venv python3-pip
sudo apt install --upgrade python3-setuptools
Create the virtual environment and install CircuitPython:
cd rpi-thermometer
./new-venv
A reboot will probably be required when complete.
Synchronize the venv with the pinned drivers:
./update-venv
If requirements.in has been modified or to update the versions of the python dependencies, run update-venv with the build option. This will
first update requirements.txt with the new module requirements.
cd rpi-thermometer
. venv/bin/activate
cd app
./main.py
There are two ways to install the software on a Raspberry Pi. The first method is to clone the repo on the host machine and use ansible to install the software on the Raspberry Pi. This is preferred if you plan to extend the project. The second method is to clone the repo to the Raspberry Pi and use ansible to install the software on .
localhostedit hosts.yml to include your target system(s).
Run
. venv/bin/activate
ansible-playbook -i hosts.yml install-env.yaml --limit <hostname_of_rpi>
ansible-playbook -i hosts.yml install.yaml --limit <hostname_of_rpi>
localhostssh to your Raspberry Pi or from the console install the environment as described in Installing the Environment
Run
. venv/bin/activate
ansible-playbook -i hosts.yml install-env.yaml --limit localhost
ansible-playbook -i hosts.yml install.yaml --limit localhost
sudo, add the -K option to the ansible-playbook commands above.The UI Layout was created using QtCreator. Use QtCreator to update the basic forms and widgets in the UI. If changes are made to any of the .ui files, update the UI Python files as follows:
cd <project_dir>
. venv/bin/activate
./generate_ui.sh
Now the project can be installed on a target system.
No comments yet. Be the first to ask about this board.