what input pin is it using?

There's a delay(50) in the ISR. Not a good idea.