Stepper Motor Step Accuracy Issues

When ever your code disables and then enables the controller, the magnet coils are re-energized. It is impossible to have the coils energized at identically the exact same time. This will cause movement.

Paul