8000 GitHub - alexmrqt/micropython-sgp30 at 3eb9a730935190fbc5438a24bd7a0729166613de
[go: up one dir, main page]

Skip to content

alexmrqt/micropython-sgp30

Repository files navigation

Introduction

Documentation Status Discord

This is a CircuitPython driver for the Sensirion SGP30 air quality sensor, it can provide CO2eq (equivalent CO2) and TVOC (Total Volatile Organic Compounds) with a simple I2C interface

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Usage Example

``` import board import busio import time import adafruit_sgp30

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

# Create library object on our I2C port sgp30 = adafruit_sgp30.Adafruit_SGP30(i2c)

print("SGP30 serial #", [hex(i) for i in sgp30._serial])

sgp30.sgp_iaq_init() while True:

co2eq, tvoc = sgp30.sgp_iaq_measure() print("CO2eq = %d ppm t TVOC = %d ppb" % (co2eq, tvoc)) time.sleep(1)

```

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

API Reference

.. toctree::
   :maxdepth: 2

   api

About

MicroPython driver for SGP30 VoC sensor

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%
0