Skip to main content

Python module for reading CO2 concentration from a Senseair S8 sensor connected to a Raspberry Pi

Project description

Introduction

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.9.tar.gz (2.1 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.9-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file senseair_s8-0.0.9.tar.gz.

File metadata

  • Download URL: senseair_s8-0.0.9.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for senseair_s8-0.0.9.tar.gz
Algorithm Hash digest
SHA256 07cf1697d805793786764770fd0982b258fb4752da16cf45f9a384438b3bb9b1
MD5 10f6836f419d6a689c645c4070c8d082
BLAKE2b-256 40b87d1b0d6b65eb1d0a05d0935fda53ee30a27ff236933ad5dc4a6099411cba

See more details on using hashes here.

File details

Details for the file senseair_s8-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: senseair_s8-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for senseair_s8-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 7e819a953da09a8a6d6d1c26c3ceeaa0499f35fc1286db7c7530165adeae7b02
MD5 7f59659e035f1dc0470ca0f298cfc8d4
BLAKE2b-256 c5911ace1825133577874372e57f6dfbdbb49267b39d10fadb78ad11bd3dd171

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