Designing Arduino Sketches Around External Interrupts: An Architecture Note
An architecture note on Arduino external interrupts: the ISR-as-flag pattern, volatile and atomic-read boundaries, operational checks, and the failure modes that should change your design.