My project is currently a soup of mixed IF ELSE statements that can be hard to follow as all the different “rules” are applied and moving through the states. I essentially have (6) modes/states that have been wrapped into functions that are managed via a Case stement in the main loop (ala RGBPongClock) and the transitions are buried at the top of those functions to allow for nearly any state to transition to another state. A little research has led me to Finite State Machines (FSMs) but I also see a lot of people pointing to ID3 and similar decision trees. The inputs that determine state are well defined/known. Given my system isn’t trying to solve for “known unknows” would the effort of a decision tree vs a FSM be worth it?
Way outside anything Particle specific but I will be porting a lib for the method I ultimately choose which might help someone else out.