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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file servodoor-0.1.0.tar.gz.

File metadata

  • Download URL: servodoor-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-26-generic

File hashes

Hashes for servodoor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 93c2f3cbb31530ec1f26a217cecacecec8469760b350ec921473d3f67eee6965
MD5 0e8e86846028f39cf60473f2f15a1113
BLAKE2b-256 9e32ac965ef80aba9e2595c67fcc7b4b195c632ed0eaa8e1c76176b1a4b981df

See more details on using hashes here.

File details

Details for the file servodoor-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: servodoor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-26-generic

File hashes

Hashes for servodoor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acc27815a760b3e38321245ddd6c9646c052d13172eaad8c12f3f73da3a99c31
MD5 a20c162a3d6ebe365a700ecabaed29cf
BLAKE2b-256 5311549724f1df82b01743b34c3b6a67eab9618a6c420101dab8194cf1131e1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page