When I make the motor move at a certain distance with setMaxSpeed(), setAcceleration(), and moveTo(), it always accelerates and decelerates. Is there a way to disable the deceleration?

  • Acceleration and deceleration causes less mechanical stress. Why don't you want that? – Jot Jan 23 '19 at 17:12
  • Because I am trying to make it move in accordance to a set of acceleration data from an earthquake, and it seems weird that per value of acceleration (and distance from double integration), it accelerates and decelerates (and if the differences are too low, the motor can easily be heard vibrating) – Symplaz Jan 23 '19 at 22:50

AccelStepper, as hinted by the name, uses acceleration always. By setting the acceleration high, you reduce the amount of time spent accelerating to the set speed.

setAcceleration() sets the rate in steps per second per second. If your MaxSpeed is 200 steps per second, then setting the acceleration to 200*10 means all acceleration is over in 1/10 second. You can go higher, etc.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.