AM2315TEMP(4)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸ¦‹ AM2315TEMP(4) πŸ¦‹

okay bestie, welcome to the Kernel Interfaces Manual page for am2315temp β€” it is literally the driver for the Aosong AM2315 sensor chip via I2C bus, and we are gonna get into it πŸ’…


✨ NAME ✨

am2315temp β€” Driver for Aosong AM2315 sensor chip via I2C bus 🫢


🌸 SYNOPSIS 🌸

am2315temp* at iic? addr 0x5c

πŸ’– DESCRIPTION πŸ’–

The am2315temp driver gives you measurements from the AM2315 humidity/temperature sensors via the envsys(4) framework. Slay.

The am2315temp addr argument selects the address at the iic(4) bus. The AM2315 has limits on how often the measurements can be read, which is lowkey important. You can change the number of times to take a reading before considering it valid, and the number of ticks to wait between readings, through sysctl(8) nodes. Iconic.

There are other oddities about the AM2315 that should be mentioned, bestie. The datasheet says the device should read no more often than every 2 seconds. Further, it also implies that a measurement is not performed until the device is:

  1. awake
  2. has been asked for a measurement

From observation, it has been noted that it is possible to ask for measurements more often than every 2 seconds, and actually get something that looks to be valid. It may, in fact, be valid, but it has also been noted that the measurements do not appear to change. This implies that a measurement was done, and then returned time and time again. It has also been noticed that if measurements are taken very close to every 2 seconds, that sometimes the device will return a I2C error on a read.

🚨 If this happens a lot, increase hw.am2315temp0.readticks a bit. Fr fr.

πŸŽ€ SYSCTL VARIABLES πŸŽ€

The following sysctl(3) variables are provided:

  • hw.am2315temp0.readcount β€” The number of times to take a reading before considering it valid. This defaults to 2.
  • hw.am2315temp0.readticks β€” The number of ticks to wait in between readings. The default is 100.
  • hw.am2315temp0.debug β€” If the driver is compiled with AM2315_DEBUG, this node will appear and can be used to set the debugging level.

πŸ‘‘ SEE ALSO πŸ‘‘

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


🌈 HISTORY 🌈

The am2315temp driver first appeared in NetBSD 8.0. Periodt.


πŸ¦‹ AUTHORS πŸ¦‹

The am2315temp driver was written by Brad Spencer <brad@anduin.eldar.org>. We love a main character with an email address πŸ’œ


πŸ’€ BUGS πŸ’€

The device does not appear to work with the gpioiic(4) bitbang controller. When tried, reads would not error, but no data was returned. Not me crying over an empty read 😭


xoxo bestie, this page came from Debian on December 28, 2017 β€” AM2315TEMP(4) signing off πŸŽ€πŸ’…

πŸ“¦ where this page comes from