Code structure and implementation (FSM)
-
Hi
I have mostly background in generic software development and a bit limited experience with FW, but enought to be familiar with lower lever programming.
In terms of program structure I am wondering if there are some general guidlines when using micropython. So a few questions:
- To what extend do you split your project into multiple submodules (.py files)
- To what extend do you use classes vs. simple functions?
- FSM (Finite State Machine) is a common way to implement FW. Do you use this?
- If FSM to what extend do you use this (just as part of specific logic or as the main structure of your program).
- Are there any best practice for how to implement FSM in python?
- Is there any best practice in fault handling?
- Other important considerations
- What practices do you follow to harden your code with regards to reliability