Skip to main content

sensirion_slf3s

Python driver for Sensirion SLF3S_XXXXX type flow sensors attached to a Sensirion SCC1-USB sensor cable. These come as part of the evaluations kits such as the one for the SLF3S-0600F sensor. The cables communicate to the host via the SHDLC (Sensirion High-Level Data Link Control) protocol.

Usage

Just clone this repo and create a virtualenv which fulfils the requirements from requirements.txt. The API documentation can be found here: https://tnaegele.github.io/sensirion_slf3s/.

Example

The following example code starts the sensor and prints periodically the measured values (requires at least Python 3.10):

from sensirion_slf3s import slf3s,find_sensor_port
from sensirion_shdlc_driver import ShdlcSerialPort, ShdlcConnection
import time


sensor_port = find_sensor_port()

with (ShdlcSerialPort(port=sensor_port, baudrate=115200) as port, 
        slf3s(ShdlcConnection(port), slave_address=0) as device):

    device.start(water=True)
    
    while True:
        flow,temp,flag = device.get_last()
        print(f'flow rate: {flow} ul/min, temperature: {temp} C, flag: {flag}')
        time.sleep(0.1)

Todo

  • find_sensor_port function is still experimental and can only handle one connected sensor

Metadata

Release files for sensirion-slf3s 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sensirion-slf3s 1.0.0
File Size Uploaded
sensirion_slf3s-1.0.0.tar.gz 16.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sensirion-slf3s 1.0.0
File Interpreter ABI Platform
sensirion_slf3s-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.0 kB

Release files / sensirion_slf3s-1.0.0.tar.gz

Download URL sensirion_slf3s-1.0.0.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0507cfc68e8c381e64d34d8b1476d2bac40f86f3be1292d5a7bb46517395c6b8
BLAKE2b-256 checksum
How to use checksums
8040fe5dd8e92e74cc2e48520fdd412ad73d610bbc62a0babc67416234e33c59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.2

Release files / sensirion_slf3s-1.0.0-py3-none-any.whl

Download URL sensirion_slf3s-1.0.0-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef1fe176d56a5665d554aea3d7a3d4687902996de901ba9f354736d6ba95b87c
BLAKE2b-256 checksum
How to use checksums
427b5e7ad0e2ffec80cd6a06c3374ab8c0b3b26750a94613b6e99184165e2f18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release 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