I do like the Idea of avoiding blocking code. I not sure it's possible I have tried to read the rotary encoder as the stepper motor runs to its desired position, and I haven't gotten a good expectable result the motor runs slowly and the encoder also misses steps. Everyone's replies are appreciated they give me Ideas to research. I thought it best to have a zero-reference point at neutral position in the center of the control movement that is always known to be for sure 0 . This way the encoder is trued up or homed, in other words. Each time the operator shifts thru the neutral position the shifter is in sync with the motor. so far I don't see a way to simultaneously drive the stepper motor and read the rotary encoder. I'm now investigating using "
#include <RotaryEncoder.h>" to read the encoder and I have got its exzample called InterruptRotator.ino runing into a serial monitor it looks very accurate. I'm in the process of attempting to mold its code into my code in order to improve motor position and control lever sync . getting lots of errors won't verify. not sure why the example sketch verifies.