adafruit_shtc3
A helper library for using the Sensirion SHTC3 Humidity and Temperature Sensor
Author(s): Bryan Siepert
Implementation Notes
Hardware:
Adafruit SHTC3 Temperature & Humidity Sensor (Product ID: 4636)
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://circuitpython.org/downloads
Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
Adafruit’s Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
- class adafruit_shtc3.SHTC3(i2c_bus: I2C)
A driver for the SHTC3 temperature and humidity sensor.
- Parameters:
i2c_bus (I2C) – The I2C bus the SHTC3 is connected to.
Quickstart: Importing and using the SHTC3 temperature and humidity sensor
Here is an example of using the
SHTC3
. First you will need to import the libraries to use the sensorimport board import adafruit_shtc3
Once this is done, you can define your
board.I2C
object and define your sensori2c = board.I2C() # uses board.SCL and board.SDA sht = adafruit_shtc3.SHTC3(i2c)
Now you have access to the temperature and humidity using the
measurements
. it will return a tuple with thetemperature
andrelative_humidity
measurementstemperature, relative_humidity = sht.measurements
- property low_power: bool
Enables the less accurate low power mode, trading accuracy for power consumption
- property measurements: Tuple[float, float]
both
temperature
andrelative_humidity
, read simultaneously
- property relative_humidity: float
The current relative humidity in % rH. This is a value from 0-100%.