Measuring temperatures with Raspberry Pi and multiple DS18B20 Sensors

The DS18B20 temperature sensor is easy to use, inexpensive and has a repeatable level of accuracy which makes it a top choice for measuring temperatures in all sorts of environments. However using multiple units with a Raspberry Pi may have seemed too difficult – until now.

Thanks to the efforts of Malcolm Maclean the process is quite simple. Only one GPIO pin is required as each DS18B20 has a unique 1-wire bus address, and with the example code running under Raspbian you can poll all the sensors in one hit and receive the temperature in Celsius along with the individual sensor’s address.

The TEMP: uses the Dallas DS18B20 1-wire digital temperature sensor, with a wide measurement range of -55 to +125°C at an accuracy of +/- 0.5°C. For more information, tutorials and to order – visit the TEMP: page.