Skip to content

Commit 64d2709

Browse files
committed
Made requested changes to clarify temperature offset
1 parent 3adfd8a commit 64d2709

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

examples/bme680_simpletest.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
# change this to match the location's pressure (hPa) at sea level
1111
bme680.sea_level_pressure = 1013.25
1212

13+
# You will usually have to add an offset to account for the temperature of
14+
# the sensor. This is usually around 5 degrees but varies by use. Use a
15+
# separate temperature sensor to calibrate this one.
16+
temperature_offset = -5
17+
1318
while True:
14-
# You will usually have to add an offset to account for the temperature of
15-
# the sensor. This is usually around 5 degrees.
16-
print("\nTemperature: %0.1f C" % bme680.temperature - 5)
19+
print("\nTemperature: %0.1f C" % bme680.temperature + temperature_offset)
1720
print("Gas: %d ohm" % bme680.gas)
1821
print("Humidity: %0.1f %%" % bme680.humidity)
1922
print("Pressure: %0.3f hPa" % bme680.pressure)

0 commit comments

Comments
 (0)