Program your own Finite State Machine using a SPLat Controller for only $29.00.
The EC1 "EasyOne", a 32-bit fully featured SPLat Controller with USB and true multi-tasking is a easy way to learn and a cheap way to build your project.
Summary
Finite State Machines (FSMs) are the most powerful way known for programming applications where the system response to an input event depends on past history. The history of the system is represented by a state. FSMs can be represented by state diagrams that clearly show the relationship between states, events and actions. A language that is well suited to FSMs, for example SPLat, will give a one-to-one correspondence between the code and parts of the state diagram.