new code to test rotery encoders