Skip to main content

Python driver for Sensirion SLF3S_XXXXX type flow sensors attached to a Sensirion SCC1-USB sensor cable.

Project description

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

Useful links

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

sensirion_slf3s-1.0.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

sensirion_slf3s-1.0.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file sensirion_slf3s-1.0.0.tar.gz.

File metadata

  • Download URL: sensirion_slf3s-1.0.0.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for sensirion_slf3s-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0507cfc68e8c381e64d34d8b1476d2bac40f86f3be1292d5a7bb46517395c6b8
MD5 2b81f7b0ec63a5da683f1706166612a5
BLAKE2b-256 8040fe5dd8e92e74cc2e48520fdd412ad73d610bbc62a0babc67416234e33c59

See more details on using hashes here.

File details

Details for the file sensirion_slf3s-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sensirion_slf3s-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef1fe176d56a5665d554aea3d7a3d4687902996de901ba9f354736d6ba95b87c
MD5 91dcdeb8f5244929523c45a6cad02470
BLAKE2b-256 427b5e7ad0e2ffec80cd6a06c3374ab8c0b3b26750a94613b6e99184165e2f18

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