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
Diff: DRV8825.h
- Revision:
- 0:a2a53dc49e0d
- Child:
- 1:c8f423bfe891
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/DRV8825.h Thu Dec 10 03:26:03 2015 +0000
@@ -0,0 +1,19 @@
+#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;
+};
\ No newline at end of file