(Linux only)
Take a temperature reading from a TEMPer Gold USB device:
https://thepihut.com/products/temper-gold-original-usb-temperature-sensor
Usage:
Run from the shell with python3 tempergold.py
Use in your own scripts by placing your own script in a folder with this file:
import tempergold
# Read from the default device
print(read_temperature())
# Read from a specific device, useful if you have multiple
print(read_temperature('/path/to/your/device')
Note:
This script was written for Python 3, but should be compatible with Python 2. You may notice only whole integer temperatures are available for Python 2, where 2 decimal places are reported in Python 3. This is due to the differences in division between python 2 and 3
@NotBobTheBuilder I like your means of data retrieval -- can I use it in
temper.py
? This is for ccweink/temper, which is a fork and continuation of urwen/temper. It's not very active, but it's more active than urwen/temper.