O'Reilly logo

Internet of Things with Python by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required