Skip to main content

An updated DRV8825 stepper motor driver library for Raspberry Pi 5

Project description

Overview

An updated DRV8825 stepper motor driver library for Raspberry Pi 5. This library is a fork of the original DRV8825 library and switches RPI.GPIO to lgpio to be compatible with Raspberry Pi 5. Useful for using the wave share stepper motor driver with Raspberry Pi 5.

Introduction

This is an updated version of the DRV8825 stepper motor driver library for Raspberry Pi 5. The original library was written for Raspberry Pi 3 and used RPI.GPIO. This library switches to lgpio to be compatible with Raspberry Pi 5. There are optional limit switches that can be set to stop the motor when triggered. These are especially useful for limiting the range of motion of the motor.

Installation

Install using the pip package manager:

pip install RPI5_DRV8825

Usage

import RPI5_DRV8825

# Define the stepper motor driver
M1 = RPI5_DRV8825.DRV8825(dir_pin=13, step_pin=19, enable_pin=12, mode_pins=(16, 17, 20), limit_pins=(6,5))

# Set the microstepping mode
M1.set_microstep(1)

limit_pins is optional and can be used to set limit switches. If limit_pins is set, the driver will stop the motor when the limit switch is triggered.

Contributing

Feel free to submit a PR on GitHub

License

Currently not distributed under any license.

Contact

  • @agadin on github

Acknowledgements

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

rpi5_drv8825-1.0.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

RPI5_DRV8825-1.0.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file rpi5_drv8825-1.0.0.tar.gz.

File metadata

  • Download URL: rpi5_drv8825-1.0.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for rpi5_drv8825-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8be86b3e48073944873370cfca50036f06d6a4508880928e1a6372a5052a8675
MD5 21ecb5be62bd7cae62635f9880e913e8
BLAKE2b-256 97208ca48892deae77a9641c35b4765b6510012b0763c217138f839d8a3aab5c

See more details on using hashes here.

File details

Details for the file RPI5_DRV8825-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: RPI5_DRV8825-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for RPI5_DRV8825-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 edda994d20bb05cd66979eeca28f168826a5746ce8e6e49962b70c2c7a50c86e
MD5 8c843323b9578edcc3d1b35247b87eae
BLAKE2b-256 2fcb221f109d8f4cb179b1693744eac3e1c813f654c02ecc58249a192eec02b6

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