The program must be run as super user, so type the following command into the terminal to start it:
sudo python thermometer.py
If all is well, you will see a series of readings like this:
Try putting your finger over the sensor to warm it up.
Adding more sensors
You can add additional DS18B20 sensors in parallel - connect all the sensors' VCC, data and ground pins together. Use a single 4.7K resistor. You will see multiple /sys/bus/w1/devices/28-nnnnn directories, each one having the unique serial number as the directory name. The python example code only works for one sensor right now so you will have to adapt it if you want it to read from different sensors at once
Page last edited January 28, 2013
Text editor powered by tinymce.