stepper motor unipolar half mode sla 7026/7033
Diff: STEPPER.h
- Revision:
- 0:3c13a1d67866
diff -r 000000000000 -r 3c13a1d67866 STEPPER.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/STEPPER.h Mon Jul 11 09:13:37 2016 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" +#define CCW 1 +#define CW 0 + +class STEPPER +{ + public: + STEPPER(PinName a, PinName a_, PinName b, PinName b_, int dir); + ~STEPPER(); + void MotorStart(); + void MotorOff(); + void SetSpeed(int speed); + void MotorControl(); + int step_cw[8]; + int step_ccw[8]; + int Speed; + int count; + int Direction; + + private: + BusOut MotorPin; + Ticker Motor; + + +}; \ No newline at end of file