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-11
Revision:
1:c8f423bfe891
Parent:
0:a2a53dc49e0d

File content as of revision 1:c8f423bfe891:

#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();
    DigitalOut stepPin;
    DigitalOut direction;
private:
    DigitalOut en;
    BusOut microstepping;
    //DigitalOut stepPin;
    //DigitalOut direction;
};