-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
I am trying to get the motor stop when it reaches the desired position. However, it appears the motor "free-wheels" with the inertia of the item connected to the motor. How do I get the motor to stop and not coast?
Here is a snippet. degrees is the position. I am using 6400 steps, acceleration = 1000, speed = 1000
` digitalWrite(ENABLE, LOW);
stepper.moveTo(int(degrees));
// Run the motor until it reaches the target position
while (stepper.distanceToGo() != 0) {
stepper.run();
}
stepper.stop();
digitalWrite(ENABLE, HIGH);`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels