I am having trouble with a hardware interrupt.
It is set to pin2 and does activate when pressed. I want it to run a little subroutine and it does that too.
It then return to the main loop where it left off and that's waht I don't want to happen.
I don't want it to excecute the main loop after the interrupt and just sit idle.
It then return to the main loop where it left off and that's waht I don't want to happen.
That's the nature of an interrupt. Stop what you are doing, complete this higher priority task, then resume what you were doing.
I don't want it to excecute the main loop after the interrupt and just sit idle.
You don't have any choice about where to resume. You do have a choice whether loop() recognizes that the interrupt occurred, and modifies its behavior based on whether or not the interrupt occurred.