Skip to main content

CircuitPython helper library for PWM/Servo FeatherWing, Shield, and Pi HAT and Bonnet kits.

Project description

Introduction

Documentation Status Discord Build Status Code Style: Black

CircuitPython helper library for the PWM/Servo FeatherWing, Shield and Pi HAT and Bonnet kits.

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-servokit

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-servokit

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-servokit

Usage Example

import time
from adafruit_servokit import ServoKit

# Set channels to the number of servo channels on your kit.
# 8 for FeatherWing, 16 for Shield/HAT/Bonnet.
kit = ServoKit(channels=8)

kit.servo[0].angle = 180
kit.continuous_servo[1].throttle = 1
time.sleep(1)
kit.continuous_servo[1].throttle = -1
time.sleep(1)
kit.servo[0].angle = 0
kit.continuous_servo[1].throttle = 0

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

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

adafruit-circuitpython-servokit-1.3.13.tar.gz (28.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file adafruit-circuitpython-servokit-1.3.13.tar.gz.

File metadata

File hashes

Hashes for adafruit-circuitpython-servokit-1.3.13.tar.gz
Algorithm Hash digest
SHA256 1eafb74c9aa9378fb4c7ecee86e5849216cc57193ba911221ae9d9a9cedc50b2
MD5 ca54e59f88b9e9d50d87e5ef64f9c3a1
BLAKE2b-256 72ac25312fd979030b1ecd4abdc0681dde8851d77809190d91c8c7c7ae990743

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_servokit-1.3.13-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_servokit-1.3.13-py3-none-any.whl
Algorithm Hash digest
SHA256 b008d72fbe666e2650aee2d3bc88d8216f7a2ce103dbc61a94e6de4cb66bbea1
MD5 0e555fefd19a28c833e3138f04b6b3a8
BLAKE2b-256 6d015483924e859c5579c3a330fa4f4911dac9c1b9ac0d110ebde470a1e56f36

See more details on using hashes here.

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