Im trying to make a emergencystop with a latching button NC with pull down configuration. If the NC is triggered the 5V control voltage is no more and the pulldown makes sure the pin is pulled down to 0V.
I expect the interrupt to loop because the trigger is still LOW but the for loop is completed instead of interrupted till the NC is no longer triggered.
You don't give much opportunity for Nood to be set true… you only need to reset Nood to false after the ISR hss set it true, and you have handled that fact in you main loop code.
The problem is that I expect the trigger for the interrupt to be set again directly after the ISR is completed making a loop of ISR. Cause state LOW is kept. I expect the for loop too block and resumed when the E-stop is deactivated.
The calling of the next adress is indeed the thing I did not account for. The goal of the E-stop in this manner is blocking the Arduino process mid everything, you know like interrupting it. The motors are all connected with the power cut-off NC line. And it is for educational purposes only.
The fun thing is when I put a serial.print in the ISR it kinda works as expected. But this is bad habit. So i guess I will have to make safety flags a thing now.