A Python package to contol University of Lausanne's pellet dispenser via USB
Project description
Pellet Dispenser Python Driver
This is a python package to use the pellet dispenser with python.
Installing
Install this package with the following shell command
pip install unil-pellet-dispenser
unil-pellet-dispenser
is based on hid and
therefore require the hidapi library to be
installed separately.
Installing hidapi
Linux
Depending on your distribution you will need to install a hidapi package.
Ubuntu / Debian based
sudo apt install libhidapi-hidraw0
macOS
The easiest is to use Homebrew:
brew install hidapi
Sample usage code
from unil_pellet_dispenser import Device, DispenserError
dev = Device()
try:
dispensed = dev.dispense(1)
print(f'Dispensed {dispensed} pellets')
except DispenserError as e:
print(e)
print(f'still dispensed {e.dispensed}')
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 unil_pellet_dispenser-0.0.1a1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffc4130b4c1f899ec9cb64a640090208e249871bfd84c5809e69fe13eda04b79 |
|
MD5 | 03be56ff89af6ac9c0e2dd6a3705408c |
|
BLAKE2b-256 | e73788519f5bd7102eb61e02a8ebe50e2ca886bd608bd1a0e57973c44484c09b |
Close
Hashes for unil_pellet_dispenser-0.0.1a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 551ae502f2ca83456bdeb7fbb777701e5434bbb5cafba12dcb4646a9bf1bca3b |
|
MD5 | 3fbef496f3530586608530ff826f8951 |
|
BLAKE2b-256 | 979817a259a6c751466a143ba04d552c79bd626c131ed51167e661cfd0fc3d62 |