//Button Interrupt 'Toggles' int pbInt = 0; // Push Button Interrupt 0 is on pin 2 int toggleOn = false; // Button click switches state void setup( ) { Serial.begin(9600); attachInterrupt(pbInt, handleClick, RISING); // Register handler } void loop( ) { if ( toggleOn ) { Serial.println("on"); } else { Serial.println("off"); } } void handleClick( ) { static unsigned long last_intTime = 0; // Zero only at start unsigned long intTime = millis( ); // Read the clock if (intTime - last_intTime > 200 ) { // Ignore when < 200mS toggleOn = !toggleOn; } last_intTime = intTime; }