Lab 6: Road Course
Due Friday, December 14, 2001 (by 2:30pm)
Because this is the last lab due on the last day of the semester,
no labs will be accepted late.
Program (20 points)
Write a program for your car that will have your car run the following
road course specification:
1) Car will be placed inside of a rectangle on the road course,
facing west; the car should drive forward until it senses a wall.
2) Given the wall, the car should turn right until it senses the
next wall.
3) Given the second wall, the car should turn right and begin
to look for a black line that will be perpendicular to its path.
4) On finding the black line, the car should turn right and
follow the new black line.
5) The car should now search for an intersection; on finding the
intersection, the car should turn right and follow the black line back
to the first wall found.
6) Repeat the course now returning to specification 2.
Notes:
- You should write your code so it is well-structured.
It should be possible to easily break it
down into the structures described in the
book and class.
- You must use procedures or functions (you may use more)
to retrieve and analyze your different port data, i.e. a function
to run motors and a procedure to analyze light sensors.
-
Use appropriate comments to describe what your program is doing.
Writing proper comments is an art; you need to describe what
your code is doing, not restate the lines of code.
- Each lab partner must turn in a copy of the assembly language
program.
- The comments at the top of the program should indicate:
- Who the author is of the program
- Who you worked with on the program
Extra Credit (50 points maximum)
- You should implement your wall and/or line detection routines
using interrupts. The way this will work is when you are running
the car around the walls, the interrupt routine will be checking
for the black line; and/or when you are following the black line, the
interrupt routine will be looking for walls.
- You may use the IRQ interrupt vector and/or RTI real time
interrupts to do the interruptions of the code.
- The amount of extra credit you receive will depend on how far
you carry this task.
- You will receive NO extra credit if you do not demonstrate by
2:30pm on December 14th.
Demonstration (10 points)
You may demonstrate the car as a partnership
or alone, but both partners must be present to demonstrate as a partnership.
For this lab,
- you must hand in the assemby language
file (.asm) using the Web Submission
page. Note: You will receive NO program points for
a program that does not assemble.
- you must
demonstrate your program works on your car to either the
Instructor or TA, and you must follow the Lab Guidelines. Email one
of us to make an appointment to do your demonstration. Someone
will be in lab right after the final on December 10th, if you wish
to demonstrate then.