File tree Expand file tree Collapse file tree 4 files changed +16
-4
lines changed
Expand file tree Collapse file tree 4 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 1212
1313""" )
1414
15- sensor = bme680 .BME680 ()
15+ try :
16+ sensor = bme680 .BME680 (bme680 .I2C_ADDR_PRIMARY )
17+ except IOError :
18+ sensor = bme680 .BME680 (bme680 .I2C_ADDR_SECONDARY )
1619
1720# These oversampling settings can be tweaked to
1821# change the balance between accuracy and noise in
Original file line number Diff line number Diff line change 88
99""" )
1010
11- sensor = bme680 .BME680 ()
11+ try :
12+ sensor = bme680 .BME680 (bme680 .I2C_ADDR_PRIMARY )
13+ except IOError :
14+ sensor = bme680 .BME680 (bme680 .I2C_ADDR_SECONDARY )
1215
1316# These calibration data can safely be commented
1417# out, if desired.
Original file line number Diff line number Diff line change 44print ("""Display Temperature, Pressure and Humidity with different offsets.
55""" )
66
7- sensor = bme680 .BME680 ()
7+ try :
8+ sensor = bme680 .BME680 (bme680 .I2C_ADDR_PRIMARY )
9+ except IOError :
10+ sensor = bme680 .BME680 (bme680 .I2C_ADDR_SECONDARY )
811
912# These oversampling settings can be tweaked to
1013# change the balance between accuracy and noise in
Original file line number Diff line number Diff line change 1010
1111""" )
1212
13- sensor = bme680 .BME680 ()
13+ try :
14+ sensor = bme680 .BME680 (bme680 .I2C_ADDR_PRIMARY )
15+ except IOError :
16+ sensor = bme680 .BME680 (bme680 .I2C_ADDR_SECONDARY )
1417
1518# These oversampling settings can be tweaked to
1619# change the balance between accuracy and noise in
You can’t perform that action at this time.
0 commit comments