I am trying to rotate one servo motor as per rotary encoder’s rotation.
But the problem is, when encoder changes its rotation direction, servo motor doesn’t change rotation direction for minimum, 180 degrees of rotation of encoder.
I have tested the Servo motor, by running “sweep” code from example, and it was running just fine.
I also checked Encoder by running separate encoder code, and it is also running fine.
Even in the code i am using, in serial monitor the value of angle is updated when encoder changes direction, but the motor doesn’t change direction with it.
Please help me.
Servo_encoder_uniform_code.ino (2.48 KB)