Patterns and Practices How to implement a State Machine for your Embedded project When you are working on an embedded device, you usually start simple. A main loop that does something. As you start to add more features, the complexity of the code