Interfacing encoder and interrupt with ESP32