Skip to main content

CircuitPython helper library for DC & Stepper Motor FeatherWing, Shield, and Pi Hat kits.

Project description

Introduction

Documentation Status Discord Build Status Code Style: Black

CircuitPython helper library for the DC & Stepper Motor FeatherWing, Shield and Pi Hat 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-motorkit

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

sudo pip3 install adafruit-circuitpython-motorkit

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-motorkit

Usage Example

DC motor example:

import time
from adafruit_motorkit import MotorKit

kit = MotorKit()

kit.motor1.throttle = 1.0
time.sleep(0.5)
kit.motor1.throttle = 0

Stepper motor example:

import time
from adafruit_motorkit import MotorKit

kit = MotorKit()

for i in range(100):
    kit.stepper1.onestep()

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

Built Distribution

File details

Details for the file adafruit-circuitpython-motorkit-1.6.9.tar.gz.

File metadata

File hashes

Hashes for adafruit-circuitpython-motorkit-1.6.9.tar.gz
Algorithm Hash digest
SHA256 301013c3b84c439a3886ff0f465d0394da97639c625e7518544b58d783d95486
MD5 6c79c226ceb9869d71dd851849bcea08
BLAKE2b-256 4927047d4e3dc26703f9f5ed9ac9a45712a491febf0d1efc8fd0b10c409d6abe

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_motorkit-1.6.9-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_motorkit-1.6.9-py3-none-any.whl
Algorithm Hash digest
SHA256 444a78775999527ba12a6a1de1d6d9226078fcf411ab21dd69bf13ed9ef67e2e
MD5 a7ed02d289e258a022785b2ac766bbef
BLAKE2b-256 a4a7e001fa8a1cc4e24eddaec14ed416b5b562bb8cf6fb9724dead4f770ae85d

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