SGP40MOX(4) | Device Drivers Manual | SGP40MOX(4) |
sgp40mox
—
sgp40mox* at iic? addr 0x59
sgp40mox
driver provides an air quality measurement
from the SGP40 sensor via the
envsys(4) framework. The
sgp40mox
addr argument selects
the address at the iic(4) bus. The
crc validity and temperature and %RH compensation can be changed through
sysctl(8) nodes.
In order to calculate the VOC index, the volatile organic compounds index, which is the measure of air quality the sensor is polled once a second and the raw sensor value is fed into the Sensirion VOC algorithm. This VOC algorithm used in this driver is licensed under a 3 clause BSD license and was pulled from the Sensirion Github repository at https://github.com/Sensirion/embedded-sgp.
hw.sgp40mox0.compensation.temperature
hw.sgp40mox0.compensation.humidity
For the best performance of the VOC algorithm it is important that the temperature and %RH compensation values be current and set using the sysctl(3) variables mentioned above. This data will need to be pulled from another source, such as a another sensor in the environment that the SGP40 is in.
hw.sgp40mox0.ignorecrc
hw.sgp40mox0.debug
SGP40_DEBUG
, this
node will appear and can be used to set the debugging level.hw.sgp40mox0.readattempts
sgp40mox
driver first appeared in
NetBSD 10.0.
sgp40mox
driver was written by Brad
Spencer
<brad@anduin.eldar.org>.
The temperature and humidity compensation could be allowed to contain fractional degrees Celsius and %RH. The driver only supports setting whole numbers for either of those.
October 7, 2021 | NetBSD 10.1 |