One-wire temperature sensors like the DS18B20 are devices that can measure temperature with a minimal amount of hardware and wiring.  These sensors use a digital protocol to send accurate temperature readings directly to your development board without the need of an analog to digital converter or other extra hardware.  You can get one-wire sensors in different form factors like waterproof and high temperature probes--these are perfect for sensing temperature in many different projects and applications.  And since these sensors use the one-wire protocol you can even have multiple of them connected to the same pin and read all their temperature values independently.  With just a few connections and some CircuitPython code you'll be sensing temperature in no time!

This guide explores how to connect a DS18B20 one-wire temperature sensor to a CircuitPython board and read its temperature from Python code using a few simple CircuitPython modules.

This guide was first published on Jan 09, 2018. It was last updated on Nov 24, 2023.

This page (Overview) was last updated on Jan 08, 2018.

Text editor powered by tinymce.