Erlang Stepper library for Raspberry Pi
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE.md
README.md
rebar.config

README.md

Stepper Motor GPIO Library for Raspberry Pi

This library requires the πGPIO library. It has only been tested with the 28BYJ-48 5V stepper motor with a ULN2003 controller board. I would love to see it expanded to handle other stepper motors.

Requirements

  • Raspbian
  • erlang 17+
  • rebar3 for library management

Usage

Your rebar.config file should look like this:

{deps, [
    {stepper, {git, "git://github.com/pymander/stepper.git", { branch, "master" }}},
    ... % other dependencies goes here
]}.

You can then compile your project or whatever like this:

rebar3 compile

Now from rebar3 shell, you can do things like this:

24> Motor = stepper:init(5, 12, 13, 23, 24). 
{motor,5,[<0.204.0>,<0.208.0>,<0.212.0>,<0.216.0>]}
25> stepper:forward(Motor, 256).             
ok
26> stepper:reverse(Motor, 300).
ok

License

MIT License © 2017 Erik L. Arneson