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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c68a347ad7e22f2bce82494a1aff4daadbbb565056b33aeed4a5a9f1e9b1c5f |
|
MD5 | 1546c28c8bf8167a1b0b963d789aa410 |
|
BLAKE2b-256 | 91411df023d1e7085e4558d729f63efe82aed34a1e43802f48164320f143f7ed |
Close
Hashes for unil_pellet_dispenser-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e964748d3c91aa5201c494da02615c0bdcb224e42efa9474ceee8b0cb6a90fe9 |
|
MD5 | 0bac3a530c94aaf64d572ba133105584 |
|
BLAKE2b-256 | 7e37bbcfb36f28a610eebdafd991aec141626996343213ff5590d219ffe1dda8 |