Python interface to Loadstar Sensors USB devices.
Project description
About
- Name: loadstar_sensors_interface
- Version: 0.3.0
- Description: Python interface to Loadstar Sensors USB devices.
- License: BSD 3-Clause License
- URL: https://github.com/janelia-pypi/loadstar_sensors_interface_python
- Author: Peter Polidoro
- Email: peter@polidoro.io
- Copyright: 2022 Howard Hughes Medical Institute
- Reference: https://www.loadstarsensors.com/
- Dependencies:
- serial_interface
Example Usage
from loadstar_sensors_interface import LoadstarSensorsInterface
dev = LoadstarSensorsInterface() # Try to automatically detect port
dev = LoadstarSensorsInterface(port='/dev/ttyUSB0') # Linux specific port
dev = LoadstarSensorsInterface(port='/dev/tty.usbmodem262471') # Mac OS X specific port
dev = LoadstarSensorsInterface(port='COM3') # Windows specific port
dev.tare()
sensor_value = dev.get_sensor_value()
model = dev.get_model()
device_id = dev.get_device_id()
units = dev.get_units()
load_capactiy = dev.get_load_capacity()
dev.set_averaging_window(10) # 1-1024 samples
dev.set_averaging_threshold(10) # 1-100 percent
dev.set_scale_factor(453.59) # e.g. lb to gram
scale_factor = dev.get_scale_factor()
settings = dev.get_settings()
Installation
https://github.com/janelia-pypi/python_setup
Linux
udev rules
sudo cp 77-loadstar-sensors.rules /etc/udev/rules.d/
pip
python3 -m venv ~/venvs/loadstar_sensors_interface
source ~/venvs/loadstar_sensors_interface/bin/activate
pip install loadstar_sensors_interface
guix
Setup guix-janelia channel:
https://github.com/guix-janelia/guix-janelia
guix install python-loadstar-sensors-interface
Windows
drivers
Download and install Windows driver:
Loadstar Sensors Windows Driver
pip
python3 -m venv C:\venvs\loadstar_sensors_interface
C:\venvs\loadstar_sensors_interface\Scripts\activate
pip install loadstar_sensors_interface
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
Close
Hashes for loadstar_sensors_interface-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e99815b15d0035668594860617668de80afc41a2353084fdcc529fd0855020d5 |
|
MD5 | 15e474f3feb9ca3f8d984c08850405cf |
|
BLAKE2b-256 | 93a48751d31e6e35883b277452f85f6d2da3dfd9d14b16700ad013cb98d95d10 |
Close
Hashes for loadstar_sensors_interface-0.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc206b02927f45f206eb0cc4404d42168f7acef2531bab743bdb2b083d7d3d02 |
|
MD5 | 4cce174c8ccb661b339058160b6c8498 |
|
BLAKE2b-256 | 7e489df433710cb61ca3164b489d42faef6f38c2445ecf3c67daed17c8910566 |