3 ms·
Don't send serial messages in an interrupt, that is crazy. Just set a flag indicating what happened (or use a queue). Then in your main loop check the flag. If
by jononor 10y ago
Don't send serial messages in an interrupt, that is crazy. Just set a flag indicating what happened (or use a queue). Then in your main loop check the flag. If the loop is not able to clear it fast enough, report it as an error.
You can handle signals at 100kHz+ with such a technique.
But yes, might very well want some configurable low-pass/debouncing logic.