Trigger external interrupt on Arduino Uno R3 with an LED and a button I want to cause the external interrupt on digital pin 2 (PD2 on ATmega328). I have chosen any logic change mode. Here is my code:

void setup()
{
    DDRD &amp;= ~( 1 &lt;&lt; DDD2 );//PD2 on input mode
    EICRA |= ( 1 &lt;&lt; ISC00 );//any logic change
    PORTD |= ( 1 &lt;&lt; PORTD2 );//pull-up enable
    EIMSK |= ( 1 &lt;&lt; INT0 );//turns on INT0

    DDRD |= ( 1 &lt;&lt; DDD5 );//PD5 on output mode
    PORTD |= ( 1 &lt;&lt; PORTD5 );//turn on PD5

    SREG |= ( 1 &lt;&lt; 7 );//global interrupts enabled
}

void loop()
{

}


ISR( INT0_vect )
{
    if( ( PIND &amp; ( 1 &lt;&lt; PIND5 ) ) &gt; 0 )//if turned on
    {
         PORTD &amp;= ~( 1 &lt;&lt; PORTD5 );//turn off led
    }
    //and vice-versa
    else
    {
         PORTD |= ( 1 &lt;&lt; PORTD5 );
    }
}


Here is how I connect things.

NOTE: I did not find an ordinary button which just connects two contacts ( which I actually use ). Here if I understand correctly the button in the picture connects left pair and right pair of contacts so everything is connected when pushed and disconnects them from each other when released.



The problem is when I push the button no interrupt occurs. What am I doing wrong?
Pin 2 is pulled up by internal R then pulled up when button is pressed?
Connect button to GND.