reads encoder ticks; calculates position and velocity