Skip to main content

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:

Connection 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/ttyS0 is disabled on a Raspberry Pi, resulting in a permission denied-error. You can enable it by:
    1. Run sudo raspi-config
    2. Select Interfacting options
    3. Select P6 Serial
    4. Select No for login console
    5. Select Yes for serial port hardware
    6. OK, Finish, Reboot - Yes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

senseair_s8-0.0.10.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

senseair_s8-0.0.10-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

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

Hashes for senseair_s8-0.0.10.tar.gz
Algorithm Hash digest
SHA256 b5fe9b1bd86998bf5101a869072cbae20ff4789e559a648fa12eed9ca9ddfac9
MD5 178af5207623de22305bc61b052eea26
BLAKE2b-256 9e994e4b84a9dac38dacddf560678edd6ecd7dc1eae7d411f427886c88520627

See more details on using hashes here.

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

Hashes for senseair_s8-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 43edd68b13c854e0aa75178bb84115ea697e73c99540c690fd24a71916a95526
MD5 dac5e77bfb4b577bd689d702993cfc65
BLAKE2b-256 4b0370f501336c67f52f9573da7b399631ec38b9366ce578348ab1f257ce71c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page