API Documentation

SHT4X

Sht4xDevice

The class Sht4xDeviceBase implements the low level interface of the sensor. The class Sht4xDevice extends the Sht4xDeviceBase. It provides additional functions to ease the use of the sensor.

class sensirion_i2c_sht4x.device.Sht4xDeviceBase(channel)[source]

Low level API implementation of SHT4X

__init__(channel)[source]
property channel
measure_high_precision_ticks()[source]

SHT4x command for a single shot measurement with high repeatability.

Return temperature_ticks:

Temperature ticks. Convert to degrees celsius by (175 * value / 65535) - 45

Return humidity_ticks:

Humidity ticks. Convert to degrees celsius by (125 * value / 65535) - 6

measure_medium_precision_ticks()[source]

SHT4x command for a single shot measurement with medium repeatability.

Return temperature_ticks:

Temperature ticks. Convert to degrees celsius by (175 * value / 65535) - 45

Return humidity_ticks:

Humidity ticks. Convert to degrees celsius by (125 * value / 65535) - 6

measure_lowest_precision_ticks()[source]

SHT4x command for a single shot measurement with lowest repeatability.

Return temperature_ticks:

Temperature ticks. Convert to degrees celsius by (175 * value / 65535) - 45

Return humidity_ticks:

Humidity ticks. Convert to degrees celsius by (125 * value / 65535) - 6

activate_highest_heater_power_long_ticks()[source]

SHT4x command to activate highest heater power and perform a single shot high precision measurement for 1s.

Return temperature_ticks:

Temperature ticks. Convert to degrees celsius by (175 * value / 65535) - 45

Return humidity_ticks:

Humidity ticks. Convert to degrees celsius by (125 * value / 65535) - 6

activate_highest_heater_power_short_ticks()[source]

SHT4x command to activate highest heater power and perform a single shot high precision measurement for 0.1s.

Return temperature_ticks:

Temperature ticks. Convert to degrees celsius by (175 * value / 65535) - 45

Return humidity_ticks:

Humidity ticks. Convert to degrees celsius by (125 * value / 65535) - 6

activate_medium_heater_power_long_ticks()[source]

SHT4x command to activate medium heater power and perform a single shot high precision measurement for 1s.

Return temperature_ticks:

Temperature ticks. Convert to degrees celsius by (175 * value / 65535) - 45

Return humidity_ticks:

Humidity ticks. Convert to degrees celsius by (125 * value / 65535) - 6

activate_medium_heater_power_short_ticks()[source]

SHT4x command to activate medium heater power and perform a single shot high precision measurement for 0.1s.

Return temperature_ticks:

Temperature ticks. Convert to degrees celsius by (175 * value / 65535) - 45

Return humidity_ticks:

Humidity ticks. Convert to degrees celsius by (125 * value / 65535) - 6

activate_lowest_heater_power_long_ticks()[source]

SHT4x command to activate lowest heater power and perform a single shot high precision measurement for 1s.

Return temperature_ticks:

Temperature ticks. Convert to degrees celsius by (175 * value / 65535) - 45

Return humidity_ticks:

Humidity ticks. Convert to degrees celsius by (125 * value / 65535) - 6

activate_lowest_heater_power_short_ticks()[source]

SHT4x command to activate lowest heater power and perform a single shot high precision measurement for 0.1s.

Return temperature_ticks:

Temperature ticks. Convert to degrees celsius by (175 * value / 65535) - 45

Return humidity_ticks:

Humidity ticks. Convert to degrees celsius by (125 * value / 65535) - 6

serial_number()[source]

Read out the serial number

Return serial_number:

Unique serial number

Note

Each sensor has a unique serial number that is assigned by Sensirion during production.It is stored in the one-time-programmable memory and cannot be manipulated after production.

soft_reset()[source]

Perform a soft reset.

Note

A reset of the sensor can be achieved in three ways: • Soft reset: use this function • I2C general call: all devices on the I2C bus are reset by sending the command 0x06 to the I2C address 0x00. • Power down (incl.pulling SCL and SDA low)

class sensirion_i2c_sht4x.device.Sht4xDevice(channel)[source]

Driver class implementation of SHT4X

sht4x

Access to base class

__init__(channel)[source]
measure_high_precision()[source]

SHT4x command for a single shot measurement with high repeatability.

Return a_temperature:

Converted from ticks to degrees celsius by (175 * ticks_value / 65535) - 45

Return a_humidity:

Converted from ticks to percent relative humdity by (125 * ticks_value / 65535) - 6

measure_medium_precision()[source]

SHT4x command for a single shot measurement with medium repeatability.

Return a_temperature:

Converted from ticks to degrees celsius by (175 * ticks_value / 65535) - 45

Return a_humidity:

Converted from ticks to percent relative humdity by (125 * ticks_value / 65535) - 6

measure_lowest_precision()[source]

SHT4x command for a single shot measurement with low repeatability.

Return a_temperature:

Converted from ticks to degrees celsius by (175 * ticks_value / 65535) - 45

Return a_humidity:

Converted from ticks to percent relative humdity by (125 * ticks_value / 65535) - 6

activate_highest_heater_power_long()[source]

SHT4x command to activate highest heater power and perform a single shot high precision measurement for 1s.

Return a_temperature:

Converted from ticks to degrees celsius by (175 * ticks_value / 65535) - 45

Return a_humidity:

Converted from ticks to percent relative humdity by (125 * ticks_value / 65535) - 6

activate_highest_heater_power_short()[source]

SHT4x command to activate highest heater power and perform a single shot high precision measurement for 0.1s.

Return a_temperature:

Converted from ticks to degrees celsius by (175 * ticks_value / 65535) - 45

Return a_humidity:

Converted from ticks to percent relative humdity by (125 * ticks_value / 65535) - 6

activate_medium_heater_power_long()[source]

SHT4x command to activate medium heater power and perform a single shot high precision measurement for 1s.

Return a_temperature:

Converted from ticks to degrees celsius by (175 * ticks_value / 65535) - 45

Return a_humidity:

Converted from ticks to percent relative humdity by (125 * ticks_value / 65535) - 6

activate_medium_heater_power_short()[source]

SHT4x command to activate medium heater power and perform a single shot high precision measurement for 0.1s.

Return a_temperature:

Converted from ticks to degrees celsius by (175 * ticks_value / 65535) - 45

Return a_humidity:

Converted from ticks to percent relative humdity by (125 * ticks_value / 65535) - 6

activate_lowest_heater_power_long()[source]

SHT4x command to activate lowest heater power and perform a single shot high precision measurement for 1s.

Return a_temperature:

Converted from ticks to degrees celsius by (175 * ticks_value / 65535) - 45

Return a_humidity:

Converted from ticks to percent relative humdity by (125 * ticks_value / 65535) - 6

activate_lowest_heater_power_short()[source]

SHT4x command to activate lowest heater power and perform a single shot high precision measurement for 0.1s.

Return a_temperature:

Converted from ticks to degrees celsius by (175 * ticks_value / 65535) - 45

Return a_humidity:

Converted from ticks to percent relative humdity by (125 * ticks_value / 65535) - 6

Commands

The transfer classes specify the data that is transferred between host and sensor. The generated transfer classes are used by the driver class and not intended for direct use.

class sensirion_i2c_sht4x.commands.MeasureHighPrecisionTicks[source]

SHT4x command for a single shot measurement with high repeatability.

CMD_ID = 253
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sht4x.commands.MeasureMediumPrecisionTicks[source]

SHT4x command for a single shot measurement with medium repeatability.

CMD_ID = 246
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sht4x.commands.MeasureLowestPrecisionTicks[source]

SHT4x command for a single shot measurement with lowest repeatability.

CMD_ID = 224
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sht4x.commands.ActivateHighestHeaterPowerLongTicks[source]

SHT4x command to activate highest heater power and perform a single shot high precision measurement for 1s.

CMD_ID = 57
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sht4x.commands.ActivateHighestHeaterPowerShortTicks[source]

SHT4x command to activate highest heater power and perform a single shot high precision measurement for 0.1s.

CMD_ID = 50
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sht4x.commands.ActivateMediumHeaterPowerLongTicks[source]

SHT4x command to activate medium heater power and perform a single shot high precision measurement for 1s.

CMD_ID = 47
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sht4x.commands.ActivateMediumHeaterPowerShortTicks[source]

SHT4x command to activate medium heater power and perform a single shot high precision measurement for 0.1s.

CMD_ID = 36
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sht4x.commands.ActivateLowestHeaterPowerLongTicks[source]

SHT4x command to activate lowest heater power and perform a single shot high precision measurement for 1s.

CMD_ID = 30
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sht4x.commands.ActivateLowestHeaterPowerShortTicks[source]

SHT4x command to activate lowest heater power and perform a single shot high precision measurement for 0.1s.

CMD_ID = 21
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sht4x.commands.SerialNumber[source]

Read out the serial number

CMD_ID = 137
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sht4x.commands.SoftReset[source]

Perform a soft reset.

CMD_ID = 148
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>

Result Types

The signal classes specify transformations of the raw sensor signals into a meaningful units. The generated signal types are used by the driver class and not intended for direct use.

class sensirion_i2c_sht4x.result_types.SignalTemperature(temperature_ticks)[source]

Converted from ticks to degrees celsius by (175 * ticks_value / 65535) - 45

property value
class sensirion_i2c_sht4x.result_types.SignalHumidity(humidity_ticks)[source]

Converted from ticks to percent relative humdity by (125 * ticks_value / 65535) - 6

property value