Changed when interrupt is detached and reattached.

ISR was missing sensor events because interrupt was detached throughout
main routine.