As a reminder, the sensors write to files located here: /sys/bus/w1/devices/<DEVICE-ID>/w1_slave, and they look something like this:
The t=18250 is the temperature (this would be 18.25 degrees celsius, and crc=48 YES shows that the sensor is functioning properly. If it was not, it would say NO.
It’s pretty simple to read this file… here’s the function I wrote to do it:
IO.py
I’m converting the temperature into Fahrenheit with this function as well.
To store the data, I’ll start with a simple CSV file, and append the observations.
Finally, I’ll add a loop to this file to record the sensor every 10 seconds:
Here’s a screenshot of the data streaming from the PuTTY console. I added a second sensor before taking this screenshot. I’ll cover that in a future blog post.
Now, I just have to sit back and wait to collect enough data… the suspense is killing me.