Stepper position

Hey all, I'm having an issue with a stepper motor not returning to 0 when the switch is pressed. It will return to 0 the first or 2nd time but after that it will come back to about 18%, 1 step off. I've tried resetting it, reloading the code. But I'm wondering what I can do to get better results. Thanks in advance.

I find it difficult to help with problems, when people don't tell me WHAT STEPPER motor they have, HOW it is powered, and what code they used!

Hopefully you will get my gentle hints. :slight_smile:

Without further information all we can say is "fix your problem". There's obviously something you've
done causing the motor to miss-step, which can have a variety of causes, but no way to know what
your problem is without posting all the details we need, which are carefully explained in the various
"how to post to this forum" sticky-threads....

For instance you might be failing to ramp the step rate, or physically overloading the motor,
or have an inadequate power supply, or have a bug in your code.