The loopcontains the body of the Finite state machine code. The actual code for the FSM is in UserFiniteStateMachine.h. Declarations of the I/O and the user variables can be programmed in UserConfiguration.h. Changes in this part of the software are not necassery for the FSM functionallity, but of course it is open software, so be free to make changes. Mention tha call UserFSM() in the loop; this is actually a call to the UserFiniteStateMachine.h software.
Click here for the loop code of the sketch.