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.11.tar.gz.

File metadata

File hashes

Hashes for adafruit-circuitpython-motorkit-1.6.11.tar.gz
Algorithm Hash digest
SHA256 f8fdae9b99b924d28a772d2a3f6e0867cc1b7a893e15af694ada34fdfb836616
MD5 80921b1f510bcba86cb3383a58c33375
BLAKE2b-256 fa854f0fa99caf6b31acafb5129a35fda72b4529508bcdac5c9e64db71578a8a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_motorkit-1.6.11-py3-none-any.whl
Algorithm Hash digest
SHA256 543b2363780e7654a6ed31d0fdb61c0a3c4c2fa168a5cbdb30fd7818370acd71
MD5 b5b882f423a24ac56c269ab027bed5f7
BLAKE2b-256 fb8b3e386db97c97cf42a28a722c96aec45159f83e07c9cebb2da9f96936e3b7

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