DS18B20 for Arduino
There are many libraries for DS18B20 sensors. This write-up will use the most common set.
🔽 Install Arduino IDEInstall the Arduino IDE
📦 Install the libraryStart the Arduino IDE, press the Sketch menu, and then Include Library > Manage Libraries. Search for DallasTemperature and install the library.
There are also lots of other DS18B20 libraries, any of them will work if you prefer.
|VCC||3.3 - 5 volt power supply|
|SIG||signal data line for 1-Wire sensor|
A pull-up resistor is needed for the signal line, more data can be found in the datasheet. On our carrier boards, this resistor is present.
Several example sketches can be found in File > Examples > Dallas Temperature in the Arduino IDE.
➡️ Upload the code
Pick the board and port, then Upload the code.
🔎 View the output
Open the Serial Monitor, measurements should be displayed in the monitor, with updates every second.