Move from polling to event-driven FSMs: RTOS queue dispatch, run-to-completion, ISR safety, and the active-object pattern.