Python module for reading CO2 concentration from a Senseair S8 sensor connected to a Raspberry Pi
Project description
Senseair S8 for Python
Python module for reading CO2 concentration from a Senseair S8 sensor connected to a Raspberry Pi
Connecting the Senseair S8 to your Raspberry Pi
Hook up the Senseair S8 to your Raspberry Pi using the following schematic:
Image source: http://co2meters.com/Documentation/AppNotes/AN168-S8-raspberry-pi-uart.pdf
Module installation
pip install senseair-s8
Usage
As a module:
from senseair_s8 import SenseairS8
senseair_s8 = SenseairS8()
print(senseair_s8.co2())
From the command line:
python -m senseair_s8
Troubleshooting
- This module expects the sensor to be connected to port
/dev/ttyS0. It was only tested using that port, but you can override this settings when initialising the sensor:
sensair_s8 = SenseairS8(port='/dev/ttyS0')
- Out of the box,
/dev/ttyS0is disabled on a Raspberry Pi, resulting in apermission denied-error. You can enable it by:- Run
sudo raspi-config - Select Interfacting options
- Select P6 Serial
- Select No for login console
- Select Yes for serial port hardware
- OK, Finish, Reboot - Yes
- Run
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file senseair_s8-0.0.10.tar.gz.
File metadata
- Download URL: senseair_s8-0.0.10.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5fe9b1bd86998bf5101a869072cbae20ff4789e559a648fa12eed9ca9ddfac9
|
|
| MD5 |
178af5207623de22305bc61b052eea26
|
|
| BLAKE2b-256 |
9e994e4b84a9dac38dacddf560678edd6ecd7dc1eae7d411f427886c88520627
|
File details
Details for the file senseair_s8-0.0.10-py3-none-any.whl.
File metadata
- Download URL: senseair_s8-0.0.10-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43edd68b13c854e0aa75178bb84115ea697e73c99540c690fd24a71916a95526
|
|
| MD5 |
dac5e77bfb4b577bd689d702993cfc65
|
|
| BLAKE2b-256 |
4b0370f501336c67f52f9573da7b399631ec38b9366ce578348ab1f257ce71c3
|