SHT3XTEMP(4)
π SHT3XTEMP(4) β Sensirion SHT30/SHT31/SHT35 temp/humidity driver π
okay bestie, welcome to the kernel interfaces manual for sht3xtemp β the driver for the Sensirion SHT30/SHT31/SHT35 sensor chip via the I2C bus. no cap, it's a whole vibe: temp/humidity readings, sysctl knobs, and one very cute device file. π«Ά
πΈ NAME πΈ
sht3xtemp β Driver for Sensirion SHT30/SHT31/SHT35 sensor chip via I2C bus.
β¨ SYNOPSIS β¨
sht3xtemp* at iic? addr 0x44
sht3xtemp* at iic? addr 0x45
π¦ DESCRIPTION π¦
The sht3xtemp driver provides measurements from the SHT30/SHT31/SHT35 humidity/temperature sensors via the envsys(4) framework. The sht3xtemp addr locator 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. literally so many knobs to play with. ποΈ
ποΈ SYSCTL VARIABLES ποΈ
The following sysctl(8) variables are provided β vibe check them all:
hw.sht3xtemp0.modesβ Lists the modes supported by the driver and chip.hw.sht3xtemp0.modeβ 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 inhw.sht3xtemp.modes.hw.sht3xtemp0.ratesβ List the periodic update rates supported by the driver and chip.hw.sht3xtemp0.rateβ 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 inhw.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.
hw.sht3xtemp0.repeatabilitiesβ List the valid values for the repeatability used for a measurement.hw.sht3xtemp0.repeatabilityβ 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 inhw.sht3xtemp.repeatabilities.hw.sht3xtemp0.ignorecrcβ If set, the crc calculation for %RH and temperature in the measurement phrase will be ignored.hw.sht3xtemp0.heateronβ Turn the heater on and off.hw.sht3xtemp0.debugβ If the driver is compiled withSHT3X_DEBUG, this node will appear and can be used to set the debugging level.hw.sht3xtemp0.readattemptsβ 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 valuesreadattemptsnumber of times. The default is 10 which should be more than enough for most purposes.hw.sht3xtemp0.clockstretchβ The chip supports a set of commands that lets it use I2C clock stretching to perform the temperature or humidity measurement. If this is set to 1 then use the clock stretching commands with the device. Note that the I2C controller must support clock stretching in order for this to work reliability. When this option is enabled, thereadattemptssysctl noted above will not be used. This option only apply to single shot measurements.
π FILES π
/dev/sht3xtempuβ SHT3X device unitufile.
π₯ SEE ALSO π₯
π HISTORY π
The sht3xtemp driver first appeared in NetBSD 10.0. iconic.
π AUTHORS π
The sht3xtemp driver was written by Brad Spencer <brad@anduin.eldar.org>. slay.
π BUGS π
The datasheet did not provide enough information to get the alarm function of the chip working. π not the alarm function catching strays.
This page came from Debian, dated October 31, 2021, and the manual page is SHT3XTEMP(4) β mwah π
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2021 Brad Spencer <brad@anduin.eldar.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms