encoder read interrupt now works