SHT4XTEMP(4)
π SHT4XTEMP(4) β the kernel interfaces manual, but make it cute
okay so bestie, you're looking at sht4xtemp β that's the man page name, and it lives in the Kernel Interfaces Manual section 4 (iykyk, section 4 is where the driver girlies live πβ¨). It's literally the whole page for the Sensirion SHT40/SHT41/SHT45 sensor chip driver, and we're gonna go through every single line together, no skipping, no cap.
π¦ NAME
sht4xtemp β the driver for the Sensirion SHT40/SHT41/SHT45 sensor chip, and it talks to the chip over the I2C bus. That's it, that's the whole vibe. She's a driver, she reads humidity and temperature, she's iconic. π‘οΈπ§
β¨ SYNOPSIS
sht4xtemp* at iic? addr 0x44
that's the config line, copy it exactly, don't be cute with it π
πΈ DESCRIPTION
So the sht4xtemp driver gives you measurements from the SHT40/SHT41/SHT45 humidity/temperature sensors, and it does it through the envsys(4) framework (that's the sensor framework, she's the main character of the sensor world π).
The sht4xtemp addr argument picks the address on the iic(4) bus β that's how you tell the kernel where on the I2C bus your chip is hanging out.
And here's the fun part: you can change the resolution, the heater controls, and the crc validity through sysctl(8) nodes. Yes bestie, there are knobs. There are SO many knobs. Let's open them all up. π
π SYSCTL VARIABLES
These are the sysctl(3) variables the driver hands you, one by one, and I'm obsessed with each of them:
hw.sht4xtemp0.resolutionsβ lists out all the resolutions the driver and the chip support. She's just showing you the menu, you don't order from this one, you just look at it πhw.sht4xtemp0.resolutionβ this is where you actually set the resolution, aka the number of bits used for %RH and temperature. Bestie, use one of the strings listed inhw.sht4xtemp.resolutionsβ don't just freestyle a string, she will not know what you mean.hw.sht4xtemp0.ignorecrcβ if you set this, the crc calculation for %RH and temperature gets ignored. like, completely skipped. yes, on purpose. that's the whole point of the node πhw.sht4xtemp0.heateronβ turns the heater on and off. and okay, important caveat incoming: the heater is turned on right before the measurement and runs for a pulse width of time. then the measurement is taken and the heater is turned off. there's no way to keep the heater running with this chip. none. she said what she said. π₯hw.sht4xtemp0.heaterstrengthβ from1to3, this is how much energy goes into the heater. higher number = more power used. simple as that β‘hw.sht4xtemp0.heaterpulsesβ lists the valid heater pulses that the driver and chip support. the menu again π«hw.sht4xtemp0.heaterpulseβ set the heater pulse length. use one of the strings listed inhw.sht4xtemp.heaterpulsesβ same rule as before, pick from the list, don't invent πhw.sht4xtemp0.debugβ now THIS one only shows up if the driver was compiled withSHT4X_DEBUG. if it's there, you can use it to set the debugging level. if it's not there, don't go looking for it π΅οΈββοΈhw.sht4xtemp0.readattemptsβ okay so here's the lore: 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. those delays are documented in the datasheet for the chip (go read it if you're nosy, we respect that). the driver will attempt to read back the valuesreadattemptsnumber of times. the default is10, which should be more than enough for most purposes. ten tries, she's persistent, we love that for her π«Ά
π SEE ALSO
every one of these, in this order, no gatekeeping:
π HISTORY
The sht4xtemp driver first appeared in NetBSD 10.0. she's not old, she's fresh, she's new on the scene β
π§ AUTHORS
The sht4xtemp driver was written by Brad Spencer <brad@anduin.eldar.org> β thank you Brad, king behavior, we appreciate you π
and that's the whole page bestie, every single flag, node, default and caveat, nothing dropped, nothing invented π
okay so the cute sign-off: this page came to you from the Debian build of the manual, dated September 28, 2021, and the page itself is SHT4XTEMP(4) β that's the source and version and date all wrapped up in one little bow π stay hydrated, check your crc, and never try to keep that heater running π
β¨
π¦ 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