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_portfunction is still experimental and can only handle one connected sensor
Useful links
- Sensor cable data sheet: https://sensirion.com/media/documents/EE77392F/65290BF6/LQ_DS_SCC1-RS485-USB_Datasheet.pdf
- SHDLC command set: https://media.digikey.com/pdf/Data%20Sheets/Sensirion%20PDFs/LQ_CO_RS485SensorCable_SHDLC_Commands_D2.pdf
- Sensor data sheet: https://www.sensirion.com/media/documents/C4F8D965/65290BC3/LQ_DS_SLF3S-0600F_Datasheet.pdf
- SHDLC base Python driver: https://sensirion.github.io/python-shdlc-driver/shdlc.html
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)
| File | Size | Uploaded | |
|---|---|---|---|
| sensirion_slf3s-1.0.0.tar.gz | 16.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|