encoder.tick(); // just call tick() to check the state. attachInterrupt(digitalPinToInterrupt(PIN_ENCODER_A), checkPosition, CHANGE); attachInterrupt ...
Arduino library for reading rotary encoders that output a 2-bit gray code. Rotary r = Rotary(2, 3); void setup() { r.begin(); } void loop() { result = r.process(); if ...