I have been using loop interrupts for a while, and not had an issue... until now. And it is driving me nuts.

My program has 2 main loops, titled "touch" and "end" with two more nested in the "touch" loop, both titled "01"- these are just for turning with the gyro. I've attached pics so you can see this in detail.

The problem loop is the "touch" loop - the main nested one. I have a separate thread running to check the state of a switch. When it is pressed, I have a loop interrupt for the "touch" loop only. Since it is nested, and I only have one loop interrupt, I would expect it to pick up with the "end" loop and start over... but instead it ends the program, as if I interrupted both "touch" and "end".

I'm obviously missing something here... anyone with ideas, please speak up.

Full programStartEnd

  • Is the code after the "end" loop executed? The program could also terminate because of an error, is there an error icon or message on the EV3 display? Commented Apr 10, 2018 at 9:27
  • Also perhaps try renaming the outer loop. Perhaps "end" has a specific undocumented meaning... Commented Apr 10, 2018 at 10:15
  • I'm guessing that the interrupts in loop 03 are somehow being triggered. Commented Apr 10, 2018 at 21:52
  • @MichaelVerschaeve The sound at the very end does play, and there are no error messages. Changing the names of the loops does nothing different. Commented Apr 11, 2018 at 4:26


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.