to set an interrupt on both rising and falling edges. In this case finding out which event caused the interrupt is difficult. Notice that MicroPython for the ESP32 doesn’t support level interrupts, ...
When you start to work with multiple inputs that mean a range of different things, input really becomes a challenge. You can control much of the complexity using finite state machines and similar ...