Python library for the Grove-VOC and eCO2 Gas Sensor(SGP30) is an air quality detection sensor.
Project description
Seeed SGP30
The SGP30 is a digital multi-pixel gas sensor designed for easy integration into air purifier, demand-controlled ventilation, and IoT applications. Sensirion’s CMOSens®technology offers a complete sensor system on a single chip featuring a digital I2C interface, a temperature controlled micro hotplate, and two preprocessed indoor air quality signals. As the first metal-oxide gas sensor featuring multiple sensing elements on one chip, the SGP30 provides more detailed information about the air quality.
This code is for
Dependencies
This driver depends on:
This is easy to install with the following command.
curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s -
Installing from PyPI
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:
pip3 install seeed-python-sgp30
To install system-wide (this may be required in some cases):
sudo pip3 install seeed-python-sgp30
Usage Notes
First, Check the corresponding i2c number of the board:
(.env) pi@raspberrypi:~ $ ls /dev/i2c*
/dev/i2c-1
Next, initialize the sersor object:
import seeed_sgp30
from grove.i2c import Bus
sgp30 = seeed_sgp30.grove_sgp30(Bus(1)) #The default on the raspberry pie is 1, so you can also use Bus()
Reading from the Sensor
To read from the sensor:
data = sgp30.read_measurements()
co2_eq_ppm, tvoc_ppb = data.data
print("\r tVOC = {} ppb CO2eq = {} ppm ".format(
tvoc_ppb, co2_eq_ppm))
Contributing
If you have any good suggestions or comments, you can send issues or PR us.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for seeed_python_sgp30-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce5c1c308f109c0776271415da2078a9ccf33bcdba0bf4b92f46625cc7d1e227 |
|
MD5 | 56a1ec8de768ea30669c897dc5ca3e30 |
|
BLAKE2b-256 | cb527509fad09847ba86a0a6542de18624fa4bc40645e58cc160410776af5c93 |