A simple stepper motor driver library, supporting micro-stepping drivers such as the Pololu A4988 stepper driver carrier or the Sparkfun EasyDriver.

Dependents:   tes_stepper Test_all

Stepper Motor Driver, designed for use with the Pololu A4988 breakout, however more than likely compatible with, for example the Sparkfun Easy Driver

Stepper.h

Committer:
melse
Date:
2013-02-24
Revision:
0:52fb09e87581

File content as of revision 0:52fb09e87581:

#ifndef MBED_STEPPER_H
#define MBED_STEPPER_H
#endif

#include "mbed.h"

class stepper
{
public:
    stepper(PinName _en, PinName ms1, PinName ms2, PinName ms3, PinName _stepPin, PinName dir);
    void step(int microstep, int dir, float speed);
    void enable();
    void disable();
private:
    DigitalOut en;
    BusOut microstepping;
    DigitalOut stepPin;
    DigitalOut direction;
};