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: Ruff

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

adafruit_circuitpython_motorkit-1.6.21.tar.gz (4.0 MB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file adafruit_circuitpython_motorkit-1.6.21.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_motorkit-1.6.21.tar.gz
Algorithm Hash digest
SHA256 0e76675382081c11cd32618d2f288ca4d0664155cdaf9ea32efc25a322115922
MD5 07dd3f1ffb210059897ddc6030be9acc
BLAKE2b-256 da73db211b7fc6aba67443f2ca3f4b0f271e8f7e6beec72e2e39e72b76bf6df8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_motorkit-1.6.21-py3-none-any.whl
Algorithm Hash digest
SHA256 5523156b8e8d8777cbb10b559996a1d7a7d6767ccf7a0636d1aa8d81400a7997
MD5 b98faf8c061184f7e1e4208097eb6e4a
BLAKE2b-256 b1a6d2377242b8249f43c350ef95c11dc4a1309b23696b97b8fbc1041dc44108

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