|
3 | 3 | # SPDX-License-Identifier: MIT
|
4 | 4 |
|
5 | 5 | """
|
6 |
| -`CCS811` - Adafruit CCS811 Air Quality Sensor Breakout - VOC and eCO2 |
| 6 | +`adafruit_ccs811` |
7 | 7 | ======================================================================
|
8 | 8 | This library supports the use of the CCS811 air quality sensor in CircuitPython.
|
9 | 9 |
|
10 | 10 | Author(s): Dean Miller for Adafruit Industries
|
11 | 11 |
|
| 12 | +**Hardware:** |
| 13 | +
|
| 14 | +* `Adafruit CCS811 Air Quality Sensor Breakout - VOC and eCO2 |
| 15 | + <https://www.adafruit.com/product/3566>`_ |
| 16 | +
|
| 17 | +**Software and Dependencies:** |
| 18 | +
|
| 19 | +* Adafruit CircuitPython firmware for the supported boards: |
| 20 | + https://github.com/adafruit/circuitpython/releases |
| 21 | +
|
| 22 | + * Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice |
| 23 | + * Adafruit's Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register |
| 24 | +
|
12 | 25 | **Notes:**
|
13 | 26 |
|
14 | 27 | #. `Datasheet
|
|
61 | 74 | class CCS811:
|
62 | 75 | """CCS811 gas sensor driver.
|
63 | 76 |
|
64 |
| - :param ~busio.I2C i2c: The I2C bus. |
65 |
| - :param int addr: The I2C address of the CCS811. |
| 77 | + :param ~busio.I2C i2c_bus: The I2C bus the BME280 is connected to |
| 78 | + :param int address: The I2C address of the CCS811. Defaults to :const:`0x5A` |
| 79 | +
|
| 80 | + **Quickstart: Importing and using the CCS811** |
| 81 | +
|
| 82 | + Here is an example of using the :class:`CCS811` class. |
| 83 | + First you will need to import the libraries to use the sensor |
| 84 | +
|
| 85 | + .. code-block:: python |
| 86 | +
|
| 87 | + import board |
| 88 | + import adafruit_ccs811 |
| 89 | +
|
| 90 | + Once this is done you can define your `board.I2C` object and define your sensor object |
| 91 | +
|
| 92 | + .. code-block:: python |
| 93 | +
|
| 94 | + i2c = board.I2C() # uses board.SCL and board.SDA |
| 95 | + ccs811 = adafruit_ccs811.CCS811(i2c) |
| 96 | +
|
| 97 | + Now you have access to the :attr:`eco2` and :attr:`tvoc` attributes. |
| 98 | +
|
| 99 | + .. code-block:: python |
| 100 | +
|
| 101 | + eco2 = ccs811.eco2 |
| 102 | + tvoc = ccs811.tvoc |
| 103 | +
|
66 | 104 | """
|
67 | 105 |
|
68 | 106 | # set up the registers
|
@@ -142,7 +180,7 @@ def _update_data(self):
|
142 | 180 | @property
|
143 | 181 | def baseline(self):
|
144 | 182 | """
|
145 |
| - The propery reads and returns the current baseline value. |
| 183 | + The property reads and returns the current baseline value. |
146 | 184 | The returned value is packed into an integer.
|
147 | 185 | Later the same integer can be used in order
|
148 | 186 | to set a new baseline.
|
|
0 commit comments