Homework 3

If you have not already done so, download or clone the GitHub repository for the course

Remember to document everything on your blog.

Generating Complexity with Physical Finite State Machines

For this assignment you will build a finite state machine. Real-world examples of finite state machines include traffic lights, coin-operated turnstiles and game characters with the ability to perform specific actions based on user input (run, jump, throw, etc). We can build simple programs and circuits on the Arduino that can recognize sequential patterns and change their state accordingly. These can be extended to use any binary input: optical switches, temperature thresholds, footsteps, etc. The transition properties can also be extended to include other predicates: comparisons on elapsed time to prevent exiting a state before time has elapsed, more elaborate mappings of linear inputs to transition state, and more.

For this assignment see if you can create an Arduino program and circuit that recognizes patterns of input. Your program should have at least 5 different states and each should be reflected physically in your circuit and interface. For example State 1 may require that a button be pressed twice in order to blink an LED, while State 2 may require that a photocell be above or below a certain threshold to trigger a piezo buzzer. A third state may turn on another LED, while yet another state may turn it off, etc. Be creative.

In addition this is somewhat of a group project. Another requirement is that one of the states of your system must be triggered from someone else’s system. And your system should trigger a state in someone else’s. How you do this is completely up to you and you are free to trigger more than two systems (so groups of 3 or 4 are ok as well). The idea is to create complex patterns from simple if/else type rules. Try to model it on something from your own experience of the world (for example how objects may change or respond based upon how often you touch them, the time in between touches, etc). You can use the code at the link below as a starting point (you will need to devise your own circuit to go with it): https://github.com/carloscastellanos/teaching/blob/master/Arduino/Basics/Digital/InputMatch.ino

Remember to document everything on your blog

Assignment submission is through myCourses.