Hello,
the code of interrupts does not run on an ESP32. In the while loop is missing:
state = machine.disable_irq()
machine.enable_irq(state)
then the code works
With Regards
The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software