Skip to content

Commit 76d5700

Browse files
fix gas heater duration
1 parent f1b9e6c commit 76d5700

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

adafruit_bme680.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
_BME680_REG_CHIPID = const(0xD0)
4848
_BME680_BME680_COEFF_ADDR1 = const(0x89)
4949
_BME680_BME680_COEFF_ADDR2 = const(0xE1)
50-
_BME680_BME680_RES_WAIT_0 = const(0x5A)
50+
_BME680_BME680_RES_HEAT_0 = const(0x5A)
51+
_BME680_BME680_GAS_WAIT_0 = const(0x64)
5152

5253
_BME680_REG_SOFTRESET = const(0xE0)
5354
_BME680_REG_CTRL_GAS = const(0x71)
@@ -105,7 +106,9 @@ def __init__(self, *, refresh_rate=10):
105106
self._read_calibration()
106107

107108
# set up heater
108-
self._write(_BME680_BME680_RES_WAIT_0, [0x73, 0x64, 0x65])
109+
self._write(_BME680_BME680_RES_HEAT_0, [0x73])
110+
self._write(_BME680_BME680_GAS_WAIT_0, [0x65])
111+
109112
self.sea_level_pressure = 1013.25
110113
"""Pressure in hectoPascals at sea level. Used to calibrate ``altitude``."""
111114

0 commit comments

Comments
 (0)