In class, we discussed a simple framework for encoding state machines as methods rather than objects. This works well for many embedded systems that have limitied resources. Your assignment is to design a robot such that uses the framework. You might try the light-sensor robot you created for assignment 6, or you may try this with one of your programs for the final project.
Optional:Enabling multithreaded communication using a blocking message queue, which we also discussed in class, is optional.
Here is the example Java code that we discussed in class. It is for a different embedded system, so you cannot simply copy the code and use it--you have to port it, to use it--but it illustrates the point.