adafruit-circuitpython-sgp30


Nameadafruit-circuitpython-sgp30 JSON
Version 3.0.9 PyPI version JSON
download
home_page
SummaryCircuitPython library for Sensirion SGP30 gas sensor with eCO2 and TVOC.
upload_time2023-12-09 17:33:47
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords adafruit sensiron sgp30 gas sensor eco2 tvoc h2 ethanol i2c hardware micropython circuitpython
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
Introduction
============

.. image:: https://readthedocs.org/projects/adafruit-circuitpython-sgp30/badge/?version=latest
    :target: https://docs.circuitpython.org/projects/sgp30/en/latest/
    :alt: Documentation Status

.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg
    :target: https://adafru.it/discord
    :alt: Discord


.. image:: https://github.com/adafruit/Adafruit_CircuitPython_SGP30/workflows/Build%20CI/badge.svg
    :target: https://github.com/adafruit/Adafruit_CircuitPython_SGP30/actions/
    :alt: Build Status

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/psf/black
    :alt: Code Style: Black

A CircuitPython driver for the Sensirion SGP30 gas sensor with eCO2 and TVOC output. This sensor uses I2C!

Installation and Dependencies
=============================
This driver depends on:

* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_

Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.

Installing from PyPI
--------------------

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/adafruit-circuitpython-sgp30/>`_. To install for current user:

.. code-block:: shell

    pip3 install adafruit-circuitpython-sgp30

To install system-wide (this may be required in some cases):

.. code-block:: shell

    sudo pip3 install adafruit-circuitpython-sgp30

To install in a virtual environment in your current project:

.. code-block:: shell

    mkdir project-name && cd project-name
    python3 -m venv .venv
    source .venv/bin/activate
    pip3 install adafruit-circuitpython-sgp30

Usage Notes
=============

See `the guide <https://learn.adafruit.com/adafruit-sgp30-gas-tvoc-eco2-mox-sensor/circuitpython-wiring-test>`_
for wiring and installation instructions.

First, import the library:

.. code-block:: python

    import busio
    import adafruit_sgp30

Next, initialize the I2C bus object:

.. code-block:: python

    import board
    i2c_bus = busio.I2C(board.SCL, board.SDA, frequency=100000)

Since we have the I2C bus object, we can now use it to instantiate the SGP30 object:

.. code-block:: python

    sgp30 = adafruit_sgp30.Adafruit_SGP30(i2c_bus)

Reading from the Sensor
------------------------

To read from the sensor:

.. code-block:: python

    eCO2, TVOC = sgp30.iaq_measure()
    print("eCO2 = %d ppm \t TVOC = %d ppb" % (eCO2, TVOC))


Documentation
=============

API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/sgp30/en/latest/>`_.

For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.

Contributing
============

Contributions are welcome! Please read our `Code of Conduct
<https://github.com/adafruit/Adafruit_CircuitPython_sgp30/blob/main/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "adafruit-circuitpython-sgp30",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "adafruit,sensiron,sgp30,gas,sensor,eco2,tvoc,h2,ethanol,i2c,hardware,micropython,circuitpython",
    "author": "",
    "author_email": "Adafruit Industries <circuitpython@adafruit.com>",
    "download_url": "https://files.pythonhosted.org/packages/e3/03/ec0e13b2f4f2d05b143f187a5cb60131cb21eed9595bc2778c9a9cbbef2a/adafruit-circuitpython-sgp30-3.0.9.tar.gz",
    "platform": null,
    "description": "\nIntroduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-sgp30/badge/?version=latest\n    :target: https://docs.circuitpython.org/projects/sgp30/en/latest/\n    :alt: Documentation Status\n\n.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg\n    :target: https://adafru.it/discord\n    :alt: Discord\n\n\n.. image:: https://github.com/adafruit/Adafruit_CircuitPython_SGP30/workflows/Build%20CI/badge.svg\n    :target: https://github.com/adafruit/Adafruit_CircuitPython_SGP30/actions/\n    :alt: Build Status\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/psf/black\n    :alt: Code Style: Black\n\nA CircuitPython driver for the Sensirion SGP30 gas sensor with eCO2 and TVOC output. This sensor uses I2C!\n\nInstallation and Dependencies\n=============================\nThis driver depends on:\n\n* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_\n* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.\n\nInstalling from PyPI\n--------------------\n\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI <https://pypi.org/project/adafruit-circuitpython-sgp30/>`_. To install for current user:\n\n.. code-block:: shell\n\n    pip3 install adafruit-circuitpython-sgp30\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n    sudo pip3 install adafruit-circuitpython-sgp30\n\nTo install in a virtual environment in your current project:\n\n.. code-block:: shell\n\n    mkdir project-name && cd project-name\n    python3 -m venv .venv\n    source .venv/bin/activate\n    pip3 install adafruit-circuitpython-sgp30\n\nUsage Notes\n=============\n\nSee `the guide <https://learn.adafruit.com/adafruit-sgp30-gas-tvoc-eco2-mox-sensor/circuitpython-wiring-test>`_\nfor wiring and installation instructions.\n\nFirst, import the library:\n\n.. code-block:: python\n\n    import busio\n    import adafruit_sgp30\n\nNext, initialize the I2C bus object:\n\n.. code-block:: python\n\n    import board\n    i2c_bus = busio.I2C(board.SCL, board.SDA, frequency=100000)\n\nSince we have the I2C bus object, we can now use it to instantiate the SGP30 object:\n\n.. code-block:: python\n\n    sgp30 = adafruit_sgp30.Adafruit_SGP30(i2c_bus)\n\nReading from the Sensor\n------------------------\n\nTo read from the sensor:\n\n.. code-block:: python\n\n    eCO2, TVOC = sgp30.iaq_measure()\n    print(\"eCO2 = %d ppm \\t TVOC = %d ppb\" % (eCO2, TVOC))\n\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/sgp30/en/latest/>`_.\n\nFor information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n<https://github.com/adafruit/Adafruit_CircuitPython_sgp30/blob/main/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CircuitPython library for Sensirion SGP30 gas sensor with eCO2 and TVOC.",
    "version": "3.0.9",
    "project_urls": {
        "Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_SGP30"
    },
    "split_keywords": [
        "adafruit",
        "sensiron",
        "sgp30",
        "gas",
        "sensor",
        "eco2",
        "tvoc",
        "h2",
        "ethanol",
        "i2c",
        "hardware",
        "micropython",
        "circuitpython"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "35a39146c34f23bb8e735fb9667848ad29bd566506b7f9340ddbae703298b837",
                "md5": "b7e2566b99a59c2c8ce3833e149a5339",
                "sha256": "aebcf1936db8f08273d056406a6b5d2f7e750f6365abe1f582994242b20e19a0"
            },
            "downloads": -1,
            "filename": "adafruit_circuitpython_sgp30-3.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b7e2566b99a59c2c8ce3833e149a5339",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6424,
            "upload_time": "2023-12-09T17:33:46",
            "upload_time_iso_8601": "2023-12-09T17:33:46.460388Z",
            "url": "https://files.pythonhosted.org/packages/35/a3/9146c34f23bb8e735fb9667848ad29bd566506b7f9340ddbae703298b837/adafruit_circuitpython_sgp30-3.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e303ec0e13b2f4f2d05b143f187a5cb60131cb21eed9595bc2778c9a9cbbef2a",
                "md5": "d97ac3af227fdaaca0dd9a6f9f448a4b",
                "sha256": "684fc3a52990bb1fc0664e39aff3f27643957d67a5c67e394f38f3c7f47adb63"
            },
            "downloads": -1,
            "filename": "adafruit-circuitpython-sgp30-3.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "d97ac3af227fdaaca0dd9a6f9f448a4b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 27511,
            "upload_time": "2023-12-09T17:33:47",
            "upload_time_iso_8601": "2023-12-09T17:33:47.580970Z",
            "url": "https://files.pythonhosted.org/packages/e3/03/ec0e13b2f4f2d05b143f187a5cb60131cb21eed9595bc2778c9a9cbbef2a/adafruit-circuitpython-sgp30-3.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-09 17:33:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adafruit",
    "github_project": "Adafruit_CircuitPython_SGP30",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "adafruit-circuitpython-sgp30"
}
        
Elapsed time: 0.16089s