Skip to main content

Python interface to Loadstar Sensors USB devices.

Project description

About

- Name: loadstar_sensors_interface
- Version: 0.2.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: [Loadstar Sensors](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()
id = dev.get_id()
units = dev.get_units()
load_capactiy = dev.get_load_capacity()
gain = dev.get_gain()

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

python3 -m venv C:\venvs\loadstar_sensors_interface
C:\venvs\loadstar_sensors_interface\Scripts\activate
pip install loadstar_sensors_interface

Test

guix shell picocom
picocom -b 9600 -f n -y n -d 8 -p 1 -c /dev/ttyUSB0
?

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

loadstar_sensors_interface-0.2.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

loadstar_sensors_interface-0.2.0-py2.py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page