INT0 and INT1 Interrupt Pin of Arduino Yun

Hi All,

Just want to ask if somebody tried attaching interrupts to INT0(pin3) and INT1(Pin2)
with the Wire library is added and driving I2C devices?
Will there be a problem if I use the I2C and interrupt on INT0 and INT1 together?
Thanks in advanced..

Good Day,
Leo

I am running wire with Interrupts and it works fine

Hi Mr. Mike,

I mean using external interrupt on INT0 and INT1 that will trigger on falling edge?
I saw on the picture of the Yun pinout that the pin 2 and 3 of Yun is connected to SDA and SCL.
And the syntax is attachInterrupt(0, function1, FALLING) and attachInterrupt(1, function2, FALLING).
Will this have a conflict on the I2C communication on slave devices?

The pins (0, 1, 2, 3, 7) are interrupt capable pins but connected somewhere else.

  • Like the pin 0 and 1 are connected to the linux lininio serial port.
    Don't know yet if will have an effect if Bridge library is incorporated on the program
  • pins 2 and 3 are connected to the SDA and SCL of Yun
  • pin 7 is for connected for the handshake of the linux processor
    tried to use this pin as an interrupt on its own but don't work
    "attachInterrupt(7, function1, FALLING)".

I just want 2 interrupt pins externally triggered by edge (either FALLING or RISING)
without conflicts to other stuff. Is there a way to do it?

Thanks,
Leo

Handshake between the atmega and linux processor is not used so you can use pin 7 as interrupt source.

In the attachInterrupt function you have to specify the interrupt number and not the pin, so if you want to use the pin 7 you have to use interrupt 4 https://www.arduino.cc/en/Reference/AttachInterrupt

it should be :

attachInterrupt(4, function, FALLING)

Hi Sir Angelo,

Thanks for noting the correct number assignment for the interrupt for pin 7
which is number for 4 for assigning the interrupt.
And will not affect any linux processor operations.
I got confused with the numbers and the note on the picture.
I will try this.

Good Day,
Leo

Plan B:

Yun Shield + Arduino Mega

Arduino Mega:

External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt 4), 20 (interrupt 3), and 21 (interrupt 2). These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value.

Count 20 (interrupt 3), and 21 (interrupt 2) share with I2C, you still have 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt 4).

https://www.arduino.cc/en/Main/arduinoBoardMega

Hi Mr. Sonny,

Is the "Yun Shield" is the same with the Dragino that is capable of having the same webpage as the original Arduino Yun? Where I can display my files on the browser via the "/mnt/sda/arduino/www" path?
And can perform all "LuCi and cURL" Process commands? Thanks..

Good Day,
Leo

lpestanas:
Hi Mr. Sonny,

Is the "Yun Shield" is the same with the Dragino that is capable of having the same webpage as the original Arduino Yun? Where I can display my files on the browser via the "/mnt/sda/arduino/www" path?
And can perform all "LuCi and cURL" Process commands? Thanks..

Good Day,
Leo

Yes.