Skip to main content

Driver for stepper motors controlled by SparkFun EasyDriver board

Project description

Simple software driver for stepper motors controlled by the SparkFun EasyDriver motor controller board.

Install

pip install pyeasydriver

Usage

from pyeasydriver.easydriver import EasyDriver, StepDirection
from gpiozero import Device
from gpiozero.pins.rpigpio import RPiGPIOFactory
import RPi.GPIO as rpigpio

rpigpio.setmode(rpigpio.BCM)
rpigpio.setwarnings(False)

Device.pin_factory = RPiGPIOFactory()

if __name__=="__main__":
    STEP_PIN = 20
    DIR_PIN = 21
    ENABLE_PIN = 25
    MS1_PIN = 24
    MS2_PIN = 23


    driver = EasyDriver(step_pin=self.STEP_PIN,
                dir_pin=self.DIR_PIN, 
                ms1_pin=self.MS1_PIN, 
                ms2_pin=self.MS2_PIN,
                enable_pin=self.ENABLE_PIN)

    driver.step(200, direction=StepDirection.FORWARD)
    driver.step(200, direction=StepDirection.REVERSE)

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

pyeasydriver-0.0.1.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.

pyeasydriver-0.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file pyeasydriver-0.0.1.tar.gz.

File metadata

  • Download URL: pyeasydriver-0.0.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for pyeasydriver-0.0.1.tar.gz
Algorithm Hash digest
SHA256 50c63ad8fb88b368a33fd9c8223ad955439680358d22bdb2dd2900584272f144
MD5 60c75a34aac33422f78dc3aa5a7d7553
BLAKE2b-256 fae2d95dbb8fd557f80a6ecb2c5790ac7967c54ab65198acc9f8b0e97199341e

See more details on using hashes here.

File details

Details for the file pyeasydriver-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyeasydriver-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for pyeasydriver-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9e98c5f6ad470513d42649affb6dc2e2d359974c66d188eaec5222445d59d88a
MD5 0bb1ad452a22d45e81aa2b776626ea48
BLAKE2b-256 26ffc55d075fad206d3afb36ca34585b9de4f68bbcff1f407d533c21b078bf7b

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