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
Revision 1:c8f423bfe891, committed 2015-12-11
- Comitter:
- sventura3
- Date:
- Fri Dec 11 15:50:02 2015 +0000
- Parent:
- 0:a2a53dc49e0d
- Commit message:
- updated spelling error 2
Changed in this revision
DRV8825.cpp | Show annotated file Show diff for this revision Revisions of this file |
DRV8825.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r a2a53dc49e0d -r c8f423bfe891 DRV8825.cpp --- a/DRV8825.cpp Thu Dec 10 03:26:03 2015 +0000 +++ b/DRV8825.cpp Fri Dec 11 15:50:02 2015 +0000 @@ -3,7 +3,7 @@ DigitalOut myled(LED1); -DRV88255::DRV8825(PinName _en, PinName m0, PinName m1, PinName m2, PinName _stepPin, PinName dir):en(_en), +DRV8825::DRV8825(PinName _en, PinName m0, PinName m1, PinName m2, PinName _stepPin, PinName dir):en(_en), microstepping(m0, m1, m2), stepPin(_stepPin), direction(dir)
diff -r a2a53dc49e0d -r c8f423bfe891 DRV8825.h --- a/DRV8825.h Thu Dec 10 03:26:03 2015 +0000 +++ b/DRV8825.h Fri Dec 11 15:50:02 2015 +0000 @@ -11,9 +11,11 @@ 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; + //DigitalOut stepPin; + //DigitalOut direction; }; \ No newline at end of file