File tree 1 file changed +19
-19
lines changed
1 file changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -26,25 +26,25 @@ This is easily achieved by downloading
26
26
Usage Example
27
27
=============
28
28
29
- .. code :: python
30
-
31
- import board
32
- import busio
33
- import time
34
- import adafruit_sgp30
35
-
36
- i2c = busio.I2C(board.SCL, board.SDA, frequency=100000)
37
-
38
- # Create library object on our I2C port
39
- sgp30 = adafruit_sgp30.Adafruit_SGP30(i2c)
40
-
41
- print("SGP30 serial #", [hex(i) for i in sgp30._serial])
42
-
43
- sgp30.sgp_iaq_init()
44
- while True:
45
- co2eq, tvoc = sgp30.sgp_iaq_measure()
46
- print("CO2eq = %d ppm \t TVOC = %d ppb" % (co2eq, tvoc))
47
- time.sleep(1)
29
+ .. code-block :: python
30
+
31
+ import board
32
+ import busio
33
+ import time
34
+ import adafruit_sgp30
35
+
36
+ i2c = busio.I2C(board.SCL , board.SDA , frequency = 100000 )
37
+
38
+ # Create library object on our I2C port
39
+ sgp30 = adafruit_sgp30.Adafruit_SGP30(i2c)
40
+
41
+ print (" SGP30 serial #" , [hex (i) for i in sgp30._serial])
42
+
43
+ sgp30.sgp_iaq_init()
44
+ while True :
45
+ co2eq, tvoc = sgp30.sgp_iaq_measure()
46
+ print (" CO2eq = %d ppm \t TVOC = %d ppb" % (co2eq, tvoc))
47
+ time.sleep(1 )
48
48
49
49
Contributing
50
50
============
You can’t perform that action at this time.
0 commit comments