

If you don't have these yet, you can install them via the Arduino IDE: In this Arduino lesson we use two libraries to read the DS18B20 sensor: 1 # include 2 # include

You can use the code that others have already developed for us.

Libraries take a lot of work off your hands. The 1-wire protocol states that the signal pin becomes 'LOW' when it is read. Resistor to the 5V we know that if 1-wire does nothing with that pin it will always be 5 volts. The pull-up resistor ensures that the signal pin of the sensor cannot enter a "floating" state. In this case we place the resistor between the middle pin on the sensor and the 5V. In this circuit we use a pull-up resistor.
