A Simple Example
Let's start with a simple example. You may wish to first look at the manual documentation for the moore package or you can just follow along here and review the manual later.
Washing machine
The subject of this example will be a simple washing machine. Washing machines exhibit a circular pattern in that they proceed to perform their operations one step after another, eventually returning to the original state.Our washing machine consists of several components that we need to control:
- A water valve that we can open and close.
- A washing tub where the clothes and water are washed. The tub has a sensor that can tell us when the tub is full of water and when it is empty.
- A pump to remove water from the tub.
- A motor that can be used to agitate the clothes and spin the water out of them.