State Machine Challenges


Challenges:

For any state machine:

  1. Draw the diagram!
  2. Determine the number of states
  3. Determine all of the transition conditions
  4. Reference the cpp template;)
  5. Setup enum for the correct number of states, give them good names
  6. Rename state_name to something helpful
  7. Fill in switch case with relevant states and transition conditions

Blink LED

★★ Follow at a Distance

★★ Write a function to print the state

★★★ Travel thru a Tunnel

★★★ Detecting Slip