adafruit_shtc3

A helper library for using the Sensirion SHTC3 Humidity and Temperature Sensor

  • Author(s): Bryan Siepert

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_shtc3.SHTC3(i2c_bus)

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 sensor

import board
import adafruit_shtc3

Once this is done, you can define your board.I2C object and define your sensor

i2c = 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 the temperature and relative_humidity measurements

temperature, relative_humidity = sht.measurements
property low_power

Enables the less accurate low power mode, trading accuracy for power consumption

property measurements

both temperature and relative_humidity, read simultaneously

property relative_humidity

The current relative humidity in % rH. This is a value from 0-100%.

reset()

Perform a soft reset of the sensor, resetting all settings to their power-on defaults

property sleeping

Determines the sleep state of the sensor

property temperature

The current temperature in degrees Celsius