Rotary encoder works one way but not the other.

Rutger:

  attachInterrupt(0, doEncoder, CHANGE);

No loop!