File tree 1 file changed +14
-14
lines changed 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -54,27 +54,27 @@ To install in a virtual environment in your current project:
54
54
Usage Example
55
55
=============
56
56
57
- .. code-block :: python
57
+ .. code-block :: python3
58
58
59
- import adafruit_bme680
60
- import time
61
- import board
59
+ import adafruit_bme680
60
+ import time
61
+ import board
62
62
63
- # Create sensor object, communicating over the board's default I2C bus
63
+ # Create sensor object, communicating over the board's default I2C bus
64
64
i2c = board.I2C() # uses board.SCL and board.SDA
65
65
bme680 = adafruit_bme680.Adafruit_BME680_I2C(i2c)
66
66
67
- # change this to match the location's pressure (hPa) at sea level
68
- bme680.sea_level_pressure = 1013.25
67
+ # change this to match the location's pressure (hPa) at sea level
68
+ bme680.sea_level_pressure = 1013.25
69
69
70
- while True :
71
- print (" \n Temperature: %0.1f C" % bme680.temperature)
72
- print (" Gas: %d ohm" % bme680.gas)
73
- print (" Humidity: %0.1f %% " % bme680.relative_humidity)
74
- print (" Pressure: %0.3f hPa" % bme680.pressure)
75
- print (" Altitude = %0.2f meters" % bme680.altitude)
70
+ while True:
71
+ print("\nTemperature: %0.1f C" % bme680.temperature)
72
+ print("Gas: %d ohm" % bme680.gas)
73
+ print("Humidity: %0.1f %%" % bme680.relative_humidity)
74
+ print("Pressure: %0.3f hPa" % bme680.pressure)
75
+ print("Altitude = %0.2f meters" % bme680.altitude)
76
76
77
- time.sleep(2 )
77
+ time.sleep(2)
78
78
79
79
80
80
Contributing
You can’t perform that action at this time.
0 commit comments