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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DRV8825.h Source File

DRV8825.h

00001 #ifndef MBED_DRV8825_H
00002 #define MBED_DRV8825_H
00003 #endif
00004 
00005 #include "mbed.h"
00006 
00007 class DRV8825
00008 {
00009 public:
00010     DRV8825(PinName _en, PinName m0, PinName m1, PinName m2, PinName _stepPin, PinName dir);
00011     void settings(float microstep, int dir, float speed);
00012     void enable();
00013     void disable();
00014     DigitalOut stepPin;
00015     DigitalOut direction;
00016 private:
00017     DigitalOut en;
00018     BusOut microstepping;
00019     //DigitalOut stepPin;
00020     //DigitalOut direction;
00021 };