Here’s the schematic you need to follow:Īfter installing the needed libraries, upload the following code to your Arduino board.
To show you how the sensor works, we’ll build a simple example that reads the temperature from the DS18B20 sensor with the Arduino and displays the values on the Arduino Serial Monitor.