A simple library for controlling RC servo based doors
Project description
Servodoor: a simple library for controlling RC servo based doors
Servo door is a simple library for controlling (RC servo) doors via via Pimoroni's Servo 2040 18-channel servo controller. Initially designed for use in T-maze type experiments. The Serovo 2040 must be running the servodoor-firmware
Installing
Install using pip
$ pip install servodoor
Installing from source
This package uses the poetry dependency manager. The installation instructions for poetry can be found here
Once poetry is installed the serovodoor package can be installed using
$ poetry install
Additional documentation on using poetry can be found here
Usage
import time
from servodoor import ServoDoor
port = '/dev/ttyACM0'
ctrl = ServoDoor(port)
rsp = ctrl.get_config()
print(rsp['config'])
rsp = ctrl.get_positions()
print(rsp['positions'])
ctrl.set_doors({'front': 'open'})
time.sleep(5.0)
ctrl.set_doors({'front': 'close'})
time.sleep(5.0)
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
servodoor-0.1.0.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for servodoor-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acc27815a760b3e38321245ddd6c9646c052d13172eaad8c12f3f73da3a99c31 |
|
MD5 | a20c162a3d6ebe365a700ecabaed29cf |
|
BLAKE2b-256 | 5311549724f1df82b01743b34c3b6a67eab9618a6c420101dab8194cf1131e1a |