The Arduino Finitie State Machine is based on 3 pillars; the configurator, HMI and the actual control. The details of the pillars are described in articles of this site. In all pillars there is one recurrent item; the Tag. Tagcodes are used in all the pillars of the AFSM; you have to define the Tags in the configurator and have to use the Tags in HMI and the actual control. Each tag is stored as a control module containing name, state, value and some other information used in HMI and the control. A tag is (mostly) bound to I/O, but that is not mandatory; when no I/O is attached, the tag is called a marker. The pillars in an AFSM project, are part of a so called Visual Studio Solution. When start making a new control; make a copy of the existing standard and create your specific AFSM solution. At the moment there is a standard based on the MEGA2560 and the DUE board. The new ESP32 standard will be available in May 2021.


VS Solution


Every AFSM project exists of 3 (sub)projects; Configurator, HMI and Sketch




The configurator is used to define all I/O for your control. The standard comes with an empty configuration. The configurator is also used for defining fsm states. You can read all about it in the details of the configurator tool. It is part of the VS Solution and is ready for use.



The HMI, Human Interface, can be used in two different ways; as a very complete and sofisticated ready to run debug tool or you can use HMI to make your own custom HMI screens. It is all described in the different articles on the site. 

One exception; there is also a HMI debugger for the raspberry platform. At the moment the python3 version is not suitable as a DIY HMI. It has all benefits of the windows version except for the digital plotter and it is not (yet) part of the VS Solution.



The sketch exists of 3 parts;

  1. the UserConfiguration.h file. Except for extra declarations used for the control (like e.g. help variables), this file is generated by the Configurator tool. Of course it is possible to make changes in this file. Stay out of the sections where this is explicitly noted as comment. 
  2. the UserFiniteStateMachine. This is the actual place to create your DIY control. The actual code frames per state are generated by the configurator as a help for coding. 
  3. Sketch.ino. Sketch.ino contains all software to use in UserFiniteStateMachine.h. All available standard void's, functions and procedures are described in the articles of the site.  It is not necassery to make changes in the code of sketch.ino.