bme280: Add support for BMP280 and BME680 sensors (#4040)

This adds support for BMP280 and BME680 sensor ICs,
along with fixing calibration data readout for BME280.

Gas sensor readout for the BME680 is just the raw compensated value.
To get actual meaningful values, more research is needed.

Signed-off-by: Michael Kurz <michi.kurz@gmail.com>
This commit is contained in:
Michael Kurz 2021-03-15 16:50:29 +01:00 committed by GitHub
parent 86a924f5a6
commit b4437f8eee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 344 additions and 74 deletions

View file

@ -264,7 +264,8 @@ The following are common printer attributes:
the config file if a `SET_RETRACTION` command alters them.
- `printer["bme280 <sensor_name>"].temperature`,
`printer["bme280 <sensor_name>"].humidity`,
`printer["bme280 <sensor_name>"].pressure`: The last read values
`printer["bme280 <sensor_name>"].pressure`,
`printer["bme280 <sensor_name>"].gas`: The last read values
from the sensor.
- `printer["htu21d <sensor_name>"].temperature`,
`printer["htu21d <sensor_name>"].humidity`: The last read values

View file

@ -2039,13 +2039,13 @@ sensor_pin:
# name in the above list.
```
## BME280 temperature sensor
## BMP280/BME280/BME680 temperature sensor
BME280 two wire interface (I2C) environmental sensor. Note that this
sensor is not intended for use with extruders and heater beds, but
rather for monitoring ambient temperature (C), pressure (hPa), and
relative humidity. See
[sample-macros.cfg](../config/sample-macros.cfg) for a gcode_macro
BMP280/BME280/BME680 two wire interface (I2C) environmental sensors.
Note that thoose sensors aee not intended for use with extruders and
heater beds, but rather for monitoring ambient temperature (C),
pressure (hPa), relative humidity and in case of the BME680 gas level.
See [sample-macros.cfg](../config/sample-macros.cfg) for a gcode_macro
that may be used to report pressure and humidity in addition to
temperature.