Modified phase table in stepper.cpp to enable stepping a bipolar motor using a twin H-bridge driver.
Fork of stepper by
Corrected single-stepping, now walking up or down just one phase table. Compile-time options for driving bipolar motor in any of single-phase, two-phase, or half-stepping. Coils remain engaged at end of specifed movement command - de-energize coils by issuing a motor.move(0) while already stopped.
Diff: stepper.h
- Revision:
- 4:5b596b405573
- Parent:
- 1:94f55ebfe2db
- Child:
- 8:75fcbd49d49f
--- a/stepper.h Thu Dec 18 19:49:42 2014 +0000
+++ b/stepper.h Sun Dec 21 11:11:56 2014 +0000
@@ -106,7 +106,7 @@
uint8_t pls_width;
uint8_t ongoing;
uint32_t continue_cnt;
- uint32_t motor_step;
+ uint8_t motor_step; //keeps track of phase only, no need of uint32_t
} Motor_Control;
DigitalOut _xp, _xn, _yp, _yn;
