/** 
 * External interrupts 
 * by BARRAGAN <http://barraganstudio.com>
 * 
 * Demonstrates how to attend an externa interrupt generated on the digital 
 * pin 0.
 * It is possible to generate and attend external interrupts on the Wiring I/O 
 * board. There are 8 external interrupts, from 0 to 7 so there are 8 pins on 
 * the Wiring I/O board capable of external interrupts, 0, 1, 2, 3, 36, 37, 38, 
 * and 39 respectively.
 */

void setup() {
  // set myFunction to be called everytime 
  // interrupt 0 is generated (everytime the pin gets HIGH)
  attachInterrupt(0, myFunction, HIGH);  
  Serial.begin(9600);  // Starts serial to print data
}

void loop() { 

}

void myFunction() {
  Serial.print("Interrupt generated");
}

