using interrupts

Why have you started a new thread ?

http://forum.arduino.cc/index.php?topic=540036.0