Fully functional driver for the DRV88255 stepper motor driver. Includes microstepping, speed, disable and enable.

Dependents:   Lidar_2D_Mapping Water Play Water_pump Lidar_2D_Mapping

DRV8825.h

Committer:
sventura3
Date:
2015-12-10
Revision:
0:a2a53dc49e0d
Child:
1:c8f423bfe891

File content as of revision 0:a2a53dc49e0d:

#ifndef MBED_DRV8825_H
#define MBED_DRV8825_H
#endif

#include "mbed.h"

class DRV8825
{
public:
    DRV8825(PinName _en, PinName m0, PinName m1, PinName m2, PinName _stepPin, PinName dir);
    void settings(float microstep, int dir, float speed);
    void enable();
    void disable();
private:
    DigitalOut en;
    BusOut microstepping;
    DigitalOut stepPin;
    DigitalOut direction;
};