Configure and Test

The program must be run as super user, so type the following command into the terminal to start it:

sudo python

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
Last updated on May 04, 2015 Published on Jan 28, 2013