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_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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0507cfc68e8c381e64d34d8b1476d2bac40f86f3be1292d5a7bb46517395c6b8
|
|
| MD5 |
2b81f7b0ec63a5da683f1706166612a5
|
|
| BLAKE2b-256 |
8040fe5dd8e92e74cc2e48520fdd412ad73d610bbc62a0babc67416234e33c59
|
File details
Details for the file sensirion_slf3s-1.0.0-py3-none-any.whl.
File metadata
- Download URL: sensirion_slf3s-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef1fe176d56a5665d554aea3d7a3d4687902996de901ba9f354736d6ba95b87c
|
|
| MD5 |
91dcdeb8f5244929523c45a6cad02470
|
|
| BLAKE2b-256 |
427b5e7ad0e2ffec80cd6a06c3374ab8c0b3b26750a94613b6e99184165e2f18
|