Most embedded systems are reactive by nature. They measure certain properties of their environment with sensors and react to changes. For example, they display something, move a motor, or send a notification to another system. A reactive system is best represented by a state machine — a system that is always in one of a finite and well-defined set of possible states.

Programming finite-state machines manually can become an overwhelming task and produce results that are convoluted and hard to maintain. Graphical design tools help you to keep track of all the possible states and actions of your system. This article will give you an introduction to programming with state machines with a focus on graphical design tools. Furthermore, you will learn how to integrate the generated platform-independent code with the custom hardware-specific code to interact with the hardware — in this case, an Arduino board.

Most embedded systems are reactive by nature. They measure certain properties of their environment with sensors and react to changes. For example, they display something, move a motor, or send a notification to another system. A reactive system is best represented by a state machine — a system that is always in one of a finite and well-defined set of possible states.
Programming finite-state machines manually can become an overwhelming task and produce results that are convoluted and hard to maintain. Graphical design tools help you to keep track of all the possible states and actions of your system. This article will give you an introduction to programming with state machines with a focus on graphical design tools. Furthermore, you will learn how to integrate the generated platform-independent code with the custom hardware-specific code to interact with the hardware — in this case, an Arduino board. […]