added rotary encoder test code