Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 815 Bytes

on-off-state-machine.md

File metadata and controls

17 lines (10 loc) · 815 Bytes

A simple "On-Off" state machine

Here is a simple state machine that includes a few of the concepts.

A simple state machine

From this drawing, we can see that

  • This machine has two states{:.glossary}, On and Off
  • it transitions{:.glossary} between them whenever it gets the flick event{:.glossary} (that's the two arrows between the states)
  • The "on" state has some actions{:.glossary} that happens when it enters or exits that state.

The machine basically functions as an on-off switch which turns a light on or off whenever it gets the "flick" event

Further reading