Skip to content

Commit

Permalink
bme280: Add support for BMP280 and BME680 sensors (Klipper3d#4040)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
1am3r authored Mar 15, 2021
1 parent 86a924f commit b4437f8
Show file tree
Hide file tree
Showing 4 changed files with 344 additions and 74 deletions.
2 changes: 1 addition & 1 deletion config/sample-macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ gcode:
RESTORE_GCODE_STATE NAME=M600_state

######################################################################
# BME280 Environmental Sensor
# BMP280/BME280/BME680 Environmental Sensor
######################################################################

# The macro below assumes you have a BME280 sensor_type defined in one
Expand Down
3 changes: 2 additions & 1 deletion docs/Command_Templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions docs/Config_Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Loading

0 comments on commit b4437f8

Please sign in to comment.