Added heartbeat LED control state machine to ISR