Sensirion SGP40 VOC Sensor I2C driver for MicroPython
Sensirion SGP40 is a digital VOC (volatile organic compound) sensor. This is a I2C driver written in Python 3 for MicroPython.
Getting Started
Prerequisites
- Sensirion SGP40 Sensor Module
- MicroPython board with I2C interface
Wiring
Wire the I2C bus to the I2C bus on your MicroPython board. This is an example using the Pyboard D:
| Pyboard | SGP40 |
|---|---|
| X15 (3V3) | VDD |
| X14 (GND) | GND |
| X9 | SCL |
| X10 | SDA |
Usage
This example reads the measurements in a continous loop:
import time
from machine import I2C, Pin
from sgp40 import SGP40
i2cbus = I2C(1)
sgp40 = SGP40(i2c, 0x59)
while True:
sgp40.measure_raw()
time.sleep(1)
This returns raw data from the sensor. The data is meant to be processed by the Sensirion specific VOC Algorithm, which returns air quality reflected by an index.
Built With
License
This project is licensed under the MIT License - see the LICENSE file for details
Metadata
Release files for micropython-sgp40 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| micropython-sgp40-0.1.0.tar.gz | 3.6 kB | Without provenance | Details for micropython-sgp40-0.1.0.tar.gz |
Release files / micropython-sgp40-0.1.0.tar.gz
| Download URL | micropython-sgp40-0.1.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f55d12c77a9b9b6ba056c978c3bcb00a7bd495385a1c61f797726bdee216046
|
|
BLAKE2b-256 checksum How to use checksums |
d94a00c37985be34e0490d2d736539ef85a4c76d8a39d6def4eee613bd1a5538
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
|
Security for micropython-sgp40 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.