End mid loop() @ sensor input, how?

Can't see your code.