Skip to main content

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


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)

Uploaded Source

Built Distribution

servodoor-0.1.0-py3-none-any.whl (3.5 kB view hashes)

Uploaded 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