the stepper is working perfectly.
In spite of the do this/no do that code in setup(). Not because of it.
About the encoder?