void setup() { Serial.begin(9600); pinMode(13, OUTPUT); attachInterrupt(0, ExternalInterrupt, RISING); } void loop() { digitalWrite(13, HIGH); // set the LED on delay(1000); // wait for a second digitalWrite(13, LOW); // set the LED off delay(1000); // wait for a second } void ExternalInterrupt() { Serial.println("Interrupt!!!"); }