Interrupt issue

Digital Write and delay should never be in an interrupt function. Rethink what you want to do. No other interrupt code can begin during those functions.
Paul