Python 3 library for the Sensirion SCD30 sensor
Project description
scd30
Python library for the Sensirion SCD30 co2, temperature, humidity sensor.
I2C Clock stretching
Master needs to support Clock Stretching up to 150ms. The default in Raspbian is too low, we have to increase it:
To set it, download from here:
https://github.com/raspihats/raspihats/tree/master/clk_stretch
Compile:
gcc -o i2c1_set_clkt_tout i2c1_set_clkt_tout.c
gcc -o i2c1_get_clkt_tout i2c1_get_clkt_tout.c
execute (add to /etc/rc.local to run on every boot):
./i2c1_set_clkt_tout 20000 # for 200ms
Thanks
I borrowed some code and ideas from these two repos:
https://github.com/UnravelTEC/Raspi-Driver-SCD30 (python code, i2c clock stretching) https://github.com/sparkfun/SparkFun_SCD30_Arduino_Library (code structure, commands)
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
File details
Details for the file scd30-0.0.3.tar.gz
.
File metadata
- Download URL: scd30-0.0.3.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d082d30682bbb216657b61bd4b2ceb3f8ce26af7c82247a0d143cec9e28a5ef7 |
|
MD5 | 0a43fb2f1bb5e087e36a7e54cb4f256a |
|
BLAKE2b-256 | c3328e85cf92fb6cf99309e5d21aa447b41157cf7c23b5c472543fa0ad3936cc |
File details
Details for the file scd30-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: scd30-0.0.3-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f993c9f27c2e704c003e143dc63a21276f939040d9fbffb76e4ee4ab390c911 |
|
MD5 | f7a759ab5a716cf85ee964bf4770e60e |
|
BLAKE2b-256 | 94a0a91d4284069244786d75e08e95d7ea4cb33b9bc14cf5a1e8963242e9dec7 |