File tree 1 file changed +35
-1
lines changed 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change 20
20
21
21
**Software and Dependencies:**
22
22
23
- * Adafruit CircuitPython firmware for the ESP8622 and M0-based boards:
23
+ * Adafruit CircuitPython firmware for the supported boards:
24
24
https://github.com/adafruit/circuitpython/releases
25
25
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
26
26
"""
43
43
class Adafruit_SGP30 :
44
44
"""
45
45
A driver for the SGP30 gas sensor.
46
+
47
+ :param ~busio.I2C i2c: The I2C bus the SGP30 is connected to.
48
+ :param int address: The I2C address of the device. Defaults to :const:`0x58`
49
+
50
+
51
+ **Quickstart: Importing and using the SGP30 temperature sensor**
52
+
53
+ Here is one way of importing the `Adafruit_SGP30` class so you
54
+ can use it with the name ``sgp30``.
55
+ First you will need to import the libraries to use the sensor
56
+
57
+ .. code-block:: python
58
+
59
+ import busio
60
+ import board
61
+ import adafruit_sgp30
62
+
63
+ Once this is done you can define your `busio.I2C` object and define your sensor object
64
+
65
+ .. code-block:: python
66
+
67
+ i2c = busio.I2C(board.SCL, board.SDA, frequency=100000)
68
+ sgp30 = adafruit_sgp30.Adafruit_SGP30(i2c)
69
+
70
+ Now you have access to the Carbon Dioxide Equivalent baseline using the
71
+ :attr:`baseline_eCO2` attribute and the Total Volatile Organic Compound
72
+ baseline using the :attr:`baseline_TVOC`
73
+
74
+ .. code-block:: python
75
+
76
+ eCO2 = sgp30.baseline_eCO2
77
+ TVOC = sgp30.baseline_TVOC
78
+
79
+
46
80
"""
47
81
48
82
def __init__ (self , i2c , address = _SGP30_DEFAULT_I2C_ADDR ):
You can’t perform that action at this time.
0 commit comments