Hello, I just developed this simple state machine library for deterministic state machines implemented with Arduino. https://github.com/jrullan/StateMachine