Skip to main content

I have an Arduino Mega, and I run out of interrupt pins. I have only pin 18 available, but I need 2 of them. What can I do?

pin INTx    digitalPinToInterrupt(pin)
    
3   INT5            1
2   INT4            0       
18   TX1    INT3    5
19   RX1    INT2    4
20   SDA    INT1    3
21   SCL    INT0    2
pinINTxdigitalPinToInterrupt(pin)
3INT51
2INT40
18TX1 INT35
19RX1 INT24
20SDA INT13
21SCL INT02

I have an Arduino Mega, and I run out of interrupt pins. I have only pin 18 available, but I need 2 of them. What can I do?

pin INTx    digitalPinToInterrupt(pin)
    
3   INT5            1
2   INT4            0       
18   TX1    INT3    5
19   RX1    INT2    4
20   SDA    INT1    3
21   SCL    INT0    2

I have an Arduino Mega, and I run out of interrupt pins. I have only pin 18 available, but I need 2 of them. What can I do?

pinINTxdigitalPinToInterrupt(pin)
3INT51
2INT40
18TX1 INT35
19RX1 INT24
20SDA INT13
21SCL INT02
Became Hot Network Question
Source Link
Luigi
  • 181
  • 7

Arduino Mega: is there a way to have additional interrupt pins?

I have an Arduino Mega, and I run out of interrupt pins. I have only pin 18 available, but I need 2 of them. What can I do?

pin INTx    digitalPinToInterrupt(pin)
    
3   INT5            1
2   INT4            0       
18   TX1    INT3    5
19   RX1    INT2    4
20   SDA    INT1    3
21   SCL    INT0    2