Measuring temperature and humidity with a digital sensor
The
upm
library includes support for the digital temperature and humidity breakout board that uses the TH02 sensor in the pyupm_th02
module. The TH02
class declared in this module represents a digital temperature and humidity sensor that uses the TH02 sensor, connected to our board. The class makes it easy to initialize the sensor and retrieve the temperature and humidity values through the I2C bus. The class works with the mraa.I2c
class under the hoods to talk with the sensor, that is, to write data to and read data from the TH02 sensor that acts as a slave device connected to the I2C bus.
We will create a new TemperatureAndHumiditySensor
class to represent the temperature and humidity ...
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.