adafruit_htu21d
¶
This is a breakout for the Adafruit HTU21D-F humidity sensor breakout.
- Author(s): ktown
Implementation Notes¶
Hardware:
- Adafruit HTU21D-F Temperature & Humidity Sensor Breakout Board (Product ID: 1899)
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
- Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
-
class
adafruit_htu21d.
HTU21D
(i2c_bus, address=64)¶ A driver for the HTU21D-F temperature and humidity sensor. :param i2c_bus: The
busio.I2C
object to use. This is the only required parameter. :param int address: (optional) The I2C address of the device.-
measurement
(what)¶ Starts a measurement. Starts a measurement of either
HUMIDITY
orTEMPERATURE
depending on thewhat
argument. Returns immediately, and the result of the measurement can be retrieved with thetemperature
andrelative_humidity
properties. This way it will take much less time. This can be useful if you want to start the measurement, but don’t want the call to block until the measurement is ready – for instance, when you are doing other things at the same time.
-
relative_humidity
¶ The measured relative humidity in percent.
-
temperature
¶ The measured temperature in degrees Celcius.
-