1 Wire with DS18S20 digital thermometer

In this tutorial we will use the 1 Wire Pi Zero or 1 Wire Pi Plus with a maxim integrated DS18S20 digital thermometer. For this you will need your Raspberry Pi, an 1 Wire Pi Zero or 1 Wire Pi Plus, and a maxim integrated DS18S20 digital thermometer.

Parts Used:

Connecting the Sensor to the 1 Wire Pi Plus

If you haven’t done so install your 1 Wire Pi Plus onto the Raspberry Pi by connecting it onto the GPIO header. Make sure your Raspberry Pi is turned off when you do this to minimise the risk of damaging the Raspberry Pi or the 1 Wire Pi Plus.

Next connect the DS18S20 sensor to the 1 Wire Pi Plus. Pin 1 connects to GND, Pin 2 to OW on the 1 Wire Pi, Pin 3 connects to 5V.

For this tutorial we will start by creating a shell script to read the temperature from the sensor. You can use your favourite text editor for writing the program.

We need to create the mount point for the 1wire device with the following commands: