Hacker News new | ask | show | jobs
by jononor 3362 days 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.