Hey all, I was wondering how to correctly use an interrupt in my code to act as a shutdown function in case of a redline event. This is my first time using a Teensy and I'm not super familiar with implementing interrupts.
My research leads me to believe that interrupts only attach to a pin which enables at say a button press. However, I need an interrupt that will watch an array of values and trigger in the case of say the mean of those values being above a certain threshold. In this case the array is storing pressure values measured at every 10 or so milliseconds.

Maybe I'm going down the wrong rabbit hole and interrupts aren't the thing to use but I couldn't find any nice easy ways to run a watcher function in parallel with the rest of the system. Currently we have a bunch of calls to the watcher function hard coded after every step but it would be so much easier if there was a way to 'multi thread'? am I using that right?