changed int to int16_t in rotary encoder. call read only once and store to local variable (saves 2 bytes)