Simple temperature measurement with Raspberry Pi and DS18S20 sensor

You can easily get temperature readings from external Dallas DS18S20 sensors (using 1-wire protocol) on your Raspberry Pi.

First things first, grab your credit card and order few Dallas DS18S20 sensors and usb to serial adapters. Now you need to connect Dallas DS18S20 sensor to USB to serial adapter.

After you got hardware part sorted now you need to setup software part. Main tool for reading temperature from 1-wire sensors is digitemp.

sudo apt-get install digitemp

After digitemp is installed you need to search 1-wire bus for all connected sensors, each sensor has it's unique address so is has to be discovered and added to config file with this command:

digitemp_DS9097 -s /dev/ttyUSB0 -i

Now you can read temperature from your sensor:

digitemp_DS9097 -a -q