encoder.tick(); // just call tick() to check the state. attachInterrupt(digitalPinToInterrupt(PIN_ENCODER_A), checkPosition, CHANGE); attachInterrupt ...
const int encoderPinsA[NUM_ENCODERS] = { 10, 8, 6, 4, 2 }; // Encoder A pins; any PCINT pin const int encoderPinsB[NUM_ENCODERS] = { 11, 9, 7, 5, 3 }; // Encoder B pins; arbitrary - pick any IO #ifdef ...