int pin = 13; volatile int predelay = 10; volatile int pulseWidth = 1250; void setup() { pinMode(pin, OUTPUT); attachInterrupt(0, fireLaser, RISING); } void loop() { digitalWrite(pin, LOW); } void fireLaser() { delayMicroseconds(predelay); digitalWrite(pin, HIGH); delayMicroseconds(pulseWidth); }