Wiring an analog temperature sensor

In Chapter 6, Working with Analog Inputs and Local Storage, we used a photoresistor included in a voltage divider and we connected it to an analog input pin. We can use a similar configuration and replace the photoresistor with a thermistor to measure ambient temperature. A thermistor changes its resistance value with temperature, and therefore, we can convert resistance changes into voltage value changes.

We can also work with an analog sensor breakout board that includes a thermistor in the necessary configuration to provide us with voltage levels to an analog pin that represent temperature values. In this case, we will work with an analog temperature sensor supported in the upm library to measure ambient temperature. ...

Get Internet of Things with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.