Mbed forum

Can't get interruptIn to work on Microbit


(Simon Wihl) #1

I’m trying to use interrupts on p0/p1 on the Microbit using Interruptin.

As follows

InterruptIn event(p0);
event.rise(&Rise);
event.fall(&fall);
event.enable_irq() ;

I have functions for rise and fall and have tried using enable_irq() but still can’t get the interrupt to work. It looks like the Microbit is disabling the interrupts. The Microbit documentation suggests to use Interruptin for faster detection. Does anyone know how to do this or even if it’s possible?