After you have acceleration logic implemented, you can incorporate
displacement control. Now, your program needs to know when to
decelerate as the remaining number of steps becomes less than
the distance required for deceleration. Furthermore, if the displacement
is changed (increased) again, make sure your program responses by
speeding up to the target velocity.
At this point, assume displacement is always positive and get your
program to work first.
Copyright © 2006-02-15 by Tak Auyeung