pyupm_sht1x module¶
-
class
pyupm_sht1x.
SHT1X
(clk_pin, data_pin)[source]¶ Bases:
object
SHT1X Temperature and Humidity Sensor.
ID: sht1x
Name: Temperature and Humidity Sensor
Category: temp
Manufacturer: dfrobot
Link:https://www.dfrobot.com/wiki/index.php/SHT1x_Humidity_and_Temperature_Sensor_(SKU:_DFR0066)
Connection: gpio This driver was tested with a DFRobot SHT10 Temperature and Humidity sensor. This driver should work on all SHT1X devices.
It requires a 10K pull-up resistor connected to the data pin. The sensor can be run at differing voltages from 2.5v to 5v.
C++ includes: sht1x.hpp
-
getHumidity
()[source]¶ float getHumidity()
Query the relative humidity. update() must have been called prior to calling this function.
The relative humidity.
-
getTemperature
()[source]¶ float getTemperature()
Query the temperature in degrees Celsius. update() must have been called prior to calling this function.
The temperature in Celsius
-
readStatus
()[source]¶ uint8_t readStatus()
Read the status register.
The contents of the status register.
-
setVolts
(volts)[source]¶ void setVolts(SHT1X_VOLTS_T volts)
The Vdd voltage the sensor is being driven at can affect the temperature measurements. This function allows you to specify a voltage as close as you are using to power the sensor, so that the appropriate compensation can be made. By default, the coefficients are set for 5v operation.
volts: One of the SHT1X_VOLTS_T values.
-