SHT3XTEMP(4)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸ’– 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 in hw.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 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.

  • 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 in hw.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 with SHT3X_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 values readattempts number 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, the readattempts sysctl noted above will not be used. This option only apply to single shot measurements.

πŸŽ€ FILES πŸŽ€

  • /dev/sht3xtempu β€” SHT3X device unit u file.

πŸ”₯ 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