A simple stepper motor driver library, supporting micro-stepping drivers such as the Pololu A4988 stepper driver carrier or the Sparkfun EasyDriver.
Dependents: Robot2016_2-0_STATIC Robot2016_2-0
Fork of StepperMotor by
Stepper.h
- Committer:
- sype
- Date:
- 2016-04-13
- Revision:
- 2:1cec7e9117f2
- Parent:
- 1:e34729a7567f
- Child:
- 3:c7011e72f0c7
File content as of revision 2:1cec7e9117f2:
#ifndef MBED_STEPPER_H #define MBED_STEPPER_H #endif #include "mbed.h" #define DELAY 0.007 class Stepper { public: Stepper(PinName _en, PinName _stepPin, PinName dir); void step(int number, int dir, float speed); void enable(); void disable(); private: DigitalOut en; DigitalOut stepPin; DigitalOut direction; };