Hi!
I'm running a program on my Teensy 4.1 where the loop() takes around 10ms to execute (sometimes up to 30ms, due to heavy display code).
I need to read analogRead(A17) at least every 5ms and execute some simple code (also within the 5ms window) based on the analog input.
I've tried using analogread within intervalTimer.h ISR (which I've read is a bad idea) and it did indeed cause the loop to freeze while the ISR continues to execute normally.
Any suggestions on how to do this?
Thanks
I'm running a program on my Teensy 4.1 where the loop() takes around 10ms to execute (sometimes up to 30ms, due to heavy display code).
I need to read analogRead(A17) at least every 5ms and execute some simple code (also within the 5ms window) based on the analog input.
I've tried using analogread within intervalTimer.h ISR (which I've read is a bad idea) and it did indeed cause the loop to freeze while the ISR continues to execute normally.
Any suggestions on how to do this?
Thanks