We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb94280 commit e821489Copy full SHA for e821489
examples/ccs811_simpletest.py
@@ -3,8 +3,8 @@
3
import busio
4
import adafruit_ccs811
5
6
-i2c_bus = busio.I2C(board.SCL, board.SDA)
7
-ccs811 = adafruit_ccs811.CCS811(i2c_bus)
+i2c = busio.I2C(board.SCL, board.SDA)
+ccs811 = adafruit_ccs811.CCS811(i2c)
8
9
# Wait for the sensor to be ready and calibrate the thermistor
10
while not ccs811.data_ready:
@@ -13,6 +13,6 @@
13
ccs811.temp_offset = temp - 25.0
14
15
while True:
16
- print("CO2: %1.0f PPM, TVOC: %1.0f PPM, Temp: %0.1f C" %
17
- (ccs811.eco2, ccs811.tvoc, ccs811.temperature))
+ print("CO2: {} PPM, TVOC: {} PPM, Temp: {} C"
+ .format(ccs811.eco2, ccs811.tvoc, ccs811.temperature))
18
time.sleep(0.5)
0 commit comments