@RWB,
I think this has been a very useful exercise and one I plan to use in other projects. There are a few particular benefits:
- When troubleshooting, if you know the state of the machine, you can narrow your search for the problem to a specific piece of code where the problem will be.
- The exercise of creating the state diagram forced me to think about exactly what I wanted the code to do and provided structure that made coding easier. I simply wrote the code for each state once the overall flow was set
- When I want to add more functionality, it can be done cleanly as a new state or a modification of an existing state. This should keep the code from getting too complex over time.
I think it has been worth it and I suspect this will be even more true over time.
Thanks,
Chip