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.1a2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 346e1c1fa8ff7ba57c542bea8010774e15a2591fb152f508b3d70bf76fee935f |
|
MD5 | 46bd5f630227c2c50e3784fd38a41cc8 |
|
BLAKE2b-256 | d4db13149321b4d1d5f535d3b70a986df2567e113f9bc26993d62b24ea3429e9 |
Close
Hashes for unil_pellet_dispenser-0.0.1a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e15e4905313d6c5ad10028605eb6c9703efabc2a8de01e896ae5a2a883104f18 |
|
MD5 | 7aac0a3f6c61365efb7ba1f00e5a3174 |
|
BLAKE2b-256 | 1b111e62801dc926ad967992605fffacb9e77315076b799b3139753b0df49997 |