File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 10
10
# change this to match the location's pressure (hPa) at sea level
11
11
bme680 .sea_level_pressure = 1013.25
12
12
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
+
13
18
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 ("\n Temperature: %0.1f C" % bme680 .temperature - 5 )
19
+ print ("\n Temperature: %0.1f C" % bme680 .temperature + temperature_offset )
17
20
print ("Gas: %d ohm" % bme680 .gas )
18
21
print ("Humidity: %0.1f %%" % bme680 .humidity )
19
22
print ("Pressure: %0.3f hPa" % bme680 .pressure )
You can’t perform that action at this time.
0 commit comments