This article shows how to use a rotary encoder with arduino.Code for this project along with the video showing process is provided