Raspberry Pi temperature sensors
- Posted by ryanj Jul 25, 2021
- 1566 views
I wrote a program for the Raspberry Pi that successfully reads DS18B20 temperature sensors! It is a common IC that uses 1-wire protocol, connected to one of the GPIO pins. It turns out it's already supported by the OS, so it just took some system_exec() and pipeio:exec() calls, reading special files, and some sequence manipulation. It was surprisingly easy! I'm using "euphoria-4.1.0-ARMv6-hardfloat" without any issues so far.
It will be handy for monitoring temperature in multiple locations around the house. It reads the sensors every 1 minute and logs the data in a format easy for other programs to read. I plan to add other types of sensors (humidity, gas, light level, etc.)
It's not quite finished yet. I plan to release it to the public soon, with documentation.
https://tutorials-raspberrypi.com/raspberry-pi-temperature-sensor-1wire-ds18b20/