SHT3XTEMP(4) Device Drivers Manual SHT3XTEMP(4)

sht3xtemp
Driver for Sensirion SHT30/SHT31/SHT35 sensor chip via I2C bus

sht3xtemp* at iic? addr 0x44
sht3xtemp* at iic? addr 0x45

The sht3xtemp driver provides measurements from the SHT30/SHT31/SHT35 humidity/temperature sensors via the envsys(4) framework. The sht3xtemp addr argument selects the address at the iic(4) bus. The mode of operation, repeatability, heater controls, periodic update rate and crc validity can be changed through sysctl(8) nodes.

The following sysctl(3) variables are provided:
Lists the modes supported by the driver and chip.
Set the operation mode of the chip. The SHT3X chip can run in a single-shot measurement mode or a periodic update mode. Use one of the strings listed in hw.sht3xtemp.modes.
List the periodic update rates supported by the driver and chip.
Set the periodic update rate when the mode of operation is set to periodic. The unit for this is measurements per second, or ART which is a mode that operates at an update rate of 4Hz higher response time. Use one of the strings listed in hw.sht3xtemp.rates.

Since it is possible to have subsecond periodic updates from the chip if so desired a device file is provided that can be used to get the raw temperature and humidity values outside of the envsys(4) framework. The structure of this output is the raw temperature plus an 8-bit CRC followed by the raw humidity plus an 8-bit CRC.

List the valid values for the repeatability used for a measurement.
Set the repeatability for the measurement. The higher the repeatability the longer the measurement will take and the more power used. Use one of the strings listed in hw.sht3xtemp.repeatabilities.
If set, the crc calculation for %RH and temperature in the measurement phrase will be ignored.
Turn the heater on and off.
If the driver is compiled with SHT3X_DEBUG, this node will appear and can be used to set the debugging level.
To read %RH or temperature the chip requires that the command be sent, then a delay must be observed before a read can be done to get the values back. The delays are documented in the datasheet for the chip. The driver will attempt to read back the values readattempts number of times. The default is 10 which should be more than enough for most purposes.

/dev/sht3xtempu
SHT3X device unit u file.

envsys(4), iic(4), envstat(8), sysctl(8)

The sht3xtemp driver first appeared in NetBSD 10.0.

The sht3xtemp driver was written by Brad Spencer <brad@anduin.eldar.org>.

The datasheet did not provide enough information to get the alarm function of the chip working.
October 31, 2021 NetBSD 10.0