Mayu Wire Winding Setup With stepper motor ans Servos
Dependencies: BufferedSerial Servo X_NUCLEO_IHM01A1 mbed
Fork of WireWinding_Stepper by
Revision 26:d6a21152f6cc, committed 2016-12-05
- Comitter:
- Arkadi
- Date:
- Mon Dec 05 08:16:26 2016 +0000
- Parent:
- 25:7f8fd0790b13
- Commit message:
- Mayu Wire Winding Setup
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 7f8fd0790b13 -r d6a21152f6cc main.cpp --- a/main.cpp Mon May 23 14:23:19 2016 +0000 +++ b/main.cpp Mon Dec 05 08:16:26 2016 +0000 @@ -38,7 +38,7 @@ int32_t StepperSetPos=0; /* Number of steps to move. */ #define STEPS2Rotation 3200 - +#define NUM_Windings 750 //600 - first try Ticker ServoCorrect; /* Variables -----------------------------------------------------------------*/ @@ -166,7 +166,7 @@ ServoCorrect.attach(&ServoUpdate,0.1f); /* Requesting to go to a specified position. */ - StepperSetPos=600*STEPS2Rotation; + StepperSetPos=NUM_Windings*STEPS2Rotation; motor->GoTo(StepperSetPos); motor->WaitWhileActive(); StepperPos = motor->GetPosition();