Skip to main content

python-uart-scc1

This repository provides a Python driver for Sensirion SCC1-USB Cable. The detailed technical description of the SCC1-USB cable is provided in the datasheet.

Feature overview

On one hand the SCC1-USB exposes an API to efficiently use the supported sensors. So far support is only added for the SLF3x-Sensor family.

On the other hand the cable can be used as USB to I2c bridge for any Sensirion I2c sensor that can be plugged to the cable.

For both scenarios an example is available in the example subfolder of this repository.

Note: Using the cable as USB to I2c bridge will not allow to achieve the same throughput as with the embedded API.

The API of the driver is described on the documentation page of this repository

Getting started

Installation

It is recommended to use a virtual environment. In any case you can install the package via pip by typing:

pip install sensirion-uart-scc1

If you have cloned the repository you can install the package and all it dependencies using poetry.

poetry install

Running the examples

We provide two examples to show two basic usage scenarios of the driver

  • SLF3x Usage This example does not require any additional dependency. Once the package sensirion-uart-scc1 is installed the example is run by typing:

      python ./examples/scc1_slf3x_example/slf3x_usage.py --serial-port <your-com-port>
    
  • SLF3x Totalizer Usage This example enables the totalizer, resets it before starting a measurement, and prints the accumulated totalizer flow together with the sensor's configured unit.

      python ./examples/scc1_slf3x_example/slf3x_totalizer_usage.py --serial-port <your-com-port>
    
  • USB-I2c-Bridge This example shows how a public python driver can be used with the SCC1-USB cable. The example uses the public driver sensirion_i2c_sf06_lf. Before you run the example you need to install this driver.

      pip install sensirion_i2c_sf06_lf
    

    After having installed the driver the example is run by typing:

      python ./examples/scc1_usb_to_i2c/scc1_usb_2_i2c_usage.py --serial-port <your-com-port>
    

Contributing

You are very welcome to open issues and to create pull requests.

Nevertheless you need to understand that we cannot consider pull request that do not pass the CI-pipeline.

This section explains in short how you can make sure that your contribution passes all the checks of the CI pipeline.

The repository uses poetry for dependency management. It is used in the CI pipeline as well. The easiest way to be conformant to our coding style will be to use poetry for your contributions as well. This will allow to test and check your contributions locally before creating pull requests.

Installing and running tests

For testing some extra dependencies are required that need to be installed.

poetry install --with test

The tests (including those that are marked) can be executed by tying:

poetry run pytest

Note: On github no tests that require hardware can be run. Test cases that rely on attached hardware need to be decorated with @pytest.mark.needs_hardware

Checking code-formatting

Make sure that you code is properly formatted. The CI pipeline will check and fail if this is not the case. To check the code-formatting before pushing to the repository type:

poetry run flake8

Download files

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

Source Distribution

sensirion_uart_scc1-2.0.0.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

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

sensirion_uart_scc1-2.0.0-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file sensirion_uart_scc1-2.0.0.tar.gz.

File metadata

  • Download URL: sensirion_uart_scc1-2.0.0.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for sensirion_uart_scc1-2.0.0.tar.gz
Algorithm Hash digest
SHA256 498b72fe542398eb3aecf8081d53b828e319f9f3abdb3c089744ca586712998c
MD5 4378135fa9a8809d4d9425881685f3eb
BLAKE2b-256 d3118f44ef10db4c5557c89a8cdf083b02fe0aade1989dd5b245ad825a691c44

See more details on using hashes here.

Provenance

The following attestation bundles were made for sensirion_uart_scc1-2.0.0.tar.gz:

Publisher: publish.yml on Sensirion/python-uart-scc1

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sensirion_uart_scc1-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sensirion_uart_scc1-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0100ed45fd7dbee67cb971a659e5cba3c02b30473d7c4435dd2c7ec9862816b7
MD5 1dd981111c9675ca8b10fe45241ec1b4
BLAKE2b-256 bcf1bc73c30cbe1387dc8463d4e5e010637661fe65b7d6f41c7eef23aa47cc71

See more details on using hashes here.

Provenance

The following attestation bundles were made for sensirion_uart_scc1-2.0.0-py3-none-any.whl:

Publisher: publish.yml on Sensirion/python-uart-scc1

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page