AME 3623: Project 9: Finite State Machines
- All components of the project are due by Thursday, April 27th
at 9:00 am
- Groups are the same as for project 1.
- Discussion within groups is fine.
- Discussion across groups may not be about the specifics of the
solution (general programming/circuit issues are fine to
discuss).
At the end of this project, you should be able to:
- design a finite state machine (FSM) for mission-level control,
- translate a FSM design into C code
- connect FSM events to sensor events,
- connect FSM actions to control actions, and
- debug both FSM designs and code.
Project Outline
Your hovercraft will be placed at a location and orientation on the
field. Your craft will take the following steps:
- Wait for the switch to be pressed.
- Record the current orientation. This will be your goal
orientation.
- After a 5-second delay, ramp up the middle fan to a
point where the craft begins to turn (as measured by the gyro).
- (perhaps) Slightly drop the middle fan thrust.
- Move forward until a wall is detected to the front.
- Stop
- Make a 90 degree turn to the left
- Move forward until another wall is detected to the front.
- Stop, including shutting down all fans.
Component 1: Hardware
If you have not already, re-add the distance sensors. One
should be mounted on the front of your craft; the other should
be mounted to either the left or right side.
Component 2: Finite State Machine
Design your FSM on paper. This FSM must accomplish all of the above
steps, including handling the start from the switch press and the
stopped state.
Component 3: Software
Notes
- Implement your FSM incrementally: get one piece working well
first and then grow it.
- Draw your FSM before you implement it in code. If you
change your implementation, make the change on the diagram
first, then work on the code.
- You can do a lot of testing with your craft being held by a
group member. This will help you separate the problems of
debugging high- and low-level code (but, in the end, it must
all work together).
- Introduce STATE_STOPPING and STATE_STOPPED early into your
design/implementation.
- This is an involved project. Start early.
- Keep your batteries charged.
What to Hand In
All components of the project are due by Thursday, April 27th at
9:00 am.
- Demonstration/Code Review: All group
members must be present.
The demonstration must be completed by Tuesday, May 2nd in
order to receive credit for the project.
- Check in the following to your project 9 area of your
subversion tree:
- FSM Diagram: in PDF format. This diagram must
use the "event/action" notation for the arrows.
- Documented code: See the project 1
specification for detailed documentation
requirements.
- Personal report: Catme surveys must be completed by
Tuesday, May 2nd.
Grading
Personal programming credit:
- Each person must accumulate at least three personal programming
credits over the course of the semester. This project offers
one.
- To receive credit, you must be the primary designer,
implementer and debugger of the component. This does
not mean that your other group members should not be looking
over your shoulder. But: you must do the "driving."
Group grade distribution:
- 35%: Project implementation
- 30%: Demonstration of working project (to either
of the TA or the instructor)
- 35%: Documentation
Group Grading Rubric
Grades for individuals will be based on the group grade, but weighted
by the assessed contributions of the group members to the non-personal programming items.
andrewhfagg -- gmail.com
Last modified: Wed Apr 19 23:39:25 2017