Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
1,286 Views

Getting interrupts working on Joule in C++

Jump to solution

Hi, I am trying to get an external device to signal the Joule, via interrupts, using the MRAA library and can't seem to get it to work. I'm using pin 31 on the expansion board for my external device (that generates an interrupt signal) but I don't know what that maps to in the mraa::Gpio() constructor call in C++.

Basically, I'm calling

mraa::Gpio *p = new mraa::Gpio(pin); // what pin is GPIO 0?

p->dir(mraa::DIR_IN);

p->isr(mraa:EDGE_FALLING, myISR, data);

with error checks, but my ISR - myISR() - never gets invoked. What line in the MRAA library is GPIO 0? Or GPIO 1 or 2? Any suggestions? Thanks.

Sarir

PS On a different note, why can't I paste into this window (using IE 11)? ctrl-v or right-click -> paste does not work.

0 Kudos
1 Solution
idata
Community Manager
58 Views

Hi Sarir,

I would love to help you with this. Take a look at this thread: , it is very complete and there is the answer that you are looking for. Anyways according to the MRAA pin mapping the J12 is 1-40 and J13 41-80.

I hope you find this useful.

Regards,

 

-Leonardo

View solution in original post

2 Replies
idata
Community Manager
58 Views

The question is: How do the MRAA pins map to the Joule expansion board pins (the pins on J12 and J13)? Thanks.

idata
Community Manager
59 Views

Hi Sarir,

I would love to help you with this. Take a look at this thread: , it is very complete and there is the answer that you are looking for. Anyways according to the MRAA pin mapping the J12 is 1-40 and J13 41-80.

I hope you find this useful.

Regards,

 

-Leonardo

View solution in original post

Reply