Here is how to implement a stepper motor to sense position and actively correct any error that might accrue during actuation.