Measuring temperature with DS18B20 on Raspberry pi and display measured data.
Here is sources which I used:
-
Reading temperature from DS18B20 - Read temperature from thermometer, then the value save to the t.log and sqlite DB .
-
Displaying measured data - js library, read file temp.log, and display measured data in graph.
https://github.com/danvk/dygraphs
- Cron daemon in linux run the python code every minute (Read temperature from thermometer, then the value save to the t.log and sqlite db for late usage).
pi@raspberrypi ~/temperature $ crontab -e
To the bottom of the file add this line.
*/5 * * * * pi cd temperature && python /home/pi/temperature/temperature.py