attachInterrupt problem on RPi

Hi

I’m unable to get the attachInterrupt function to call the interrupt function

Using 0.5.1-pi.14

I’ve tried GPIO4/GPIO17 with FALLING/RISING/CHANGE - no activity seen

Are there some pins that do work?

Thanks

Regards

Julian

Hello,

Let me ping someone that might be able to help, @tylercpeacock are you able to assist?

Kyle

Hi there. Currently interrupts are not supported for the RPi on our platform. It may be something we work in in a future update but I can’t confirm that this would take place any time soon. I apologize for any inconvenience.

1 Like

Hi

I’ve worked around this problem by calling the WiringPi functions directly as follows

extern "C" int wiringPiISR (int pin, int edgeType, void (* function) (void));
#define INT_EDGE_FALLING 1
#define INT_EDGE_RISING 2
#define INT_EDGE_BOTH 3
wiringPiISR (GPIO4, INT_EDGE_FALLING, isrFunction);

Regards

Julian

Hi

It turns out that the wiringPi package must be installed for this to work

sudo apt-get install wiringpi

Regards

Julian

1 Like