This week we will be showing off Finite State Machines (FSMs) and how easy and functional they are to build in lucid.
Why use a state machine? A state machine is a model representing a system that can be in only one state at a time, transitioning between a finite set of states based on inputs or events. When software is built without clearly modelling system states things generally don’t go well.
Visual representation of state and transitions between them is the native format for FSMs.
• States are usually represented as large circles with a descriptive label.
• State transitions are triggered by conditions, represented by nodes in the paths between two states.
• Actions may be required when a state transition occurs, which may be triggered by external events, sensor values or programmatically.
Benefits of Visual State Machines:
• Clarity: Complex behaviours become easy to understand at a glance and a complete picture of all cases is easy to build and understand.
• Communication: Facilitates discussions between hardware, UX and electronic teams. Everyone can understand them!
• Live Debugging and state reporting from real devices (With Lucid).
Visual state machines shine in modelling systems like:
• User interfaces
• Game logic
• Control Systems
• IoT devices
It is good to be back from our summer break showing Lucid functions. If you have any questions or fancy giving it a go yourself, give us a message.