![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
3-26-2015 DSV
Fork of R5_StepperDrive by
Diff: StepperDrive.h
- Revision:
- 3:97bea13f40a9
- Parent:
- 2:80c0b2a5adc0
- Child:
- 4:754c74beef20
--- a/StepperDrive.h Wed Feb 17 16:47:29 2016 +0000 +++ b/StepperDrive.h Tue Feb 23 23:36:09 2016 +0000 @@ -11,30 +11,30 @@ //(serisl &, stepPinLeft, dirPinLeft, invertLeft, stepPinRight, dirPinRight, invertRight, wheelCircum, wheelSepar, periodUs) int move(float distance, float angle); bool isMoveDone(); - + Serial &pc; int getRightSteps() { return rightSteps; } int getLeftSteps() { return leftSteps; } - + private: Ticker pit; //periodic interrupt timer - + void pitCallback(); - + void stepRight(bool dir); void stepLeft(bool dir); - + DigitalOut leftStep; DigitalOut leftDir; DigitalOut rightStep; DigitalOut rightDir; - + float wheelCircum; //wheel circumference float wheelSepar; //distance between wheels bool invertLeft; //software wheel direction inversion bool invertRight; //software wheel direction inversion bool moveComplete; - + int leftSteps; int rightSteps; float leftStepsPC;