Think about the different states of your system



State machines are a concise way of describing systems with clearly distinguishable phases or states. The concept of state machines was developed in the context of computer systems but is now also used by engineers from other disciplines.

A state machine is a system which defines its current status through a set of states. The current state determines what the system is doing. According to the diagram, the state is reflected by whether the heating element is activated or not. The transition between the states happens based on events. These events can be triggered by external factors, for example a user pressing a button or a sensor reading, and by internal factors such as the result of a computation.