if you want to blink your LED by giving interrupt by push button then you can try this..
int pushButton = 2;
int LED = 13;
volatile bool flag = false;
volatile byte state = LOW;
void setup()
{
pinMode(pushButton, INPUT_PULLUP);
pinMode(LED,OUTPUT);
attachInterrupt(digitalPinToInterrupt(pushButton), &setFlag, FALLING);
}
void loop()
{
if (flag)
{
digitalWrite(LED, state);
delay(100);
state = !state;
}
}
void setFlag()
{
flag=true;
}
flag = true;
}