SE-631
Real-Time System Design and Implementation

Lab Assignment 6
(Due Monday, April 9)
Create
a project which controls the motion and lights of the train in
the
real-time lab according to the following requirements:
1. Initial position of the train:
a. by
the side of sensor 17, heading east, or
b. by
the side of sensor 24,
heading east.
2. Initialize all track
switches to STRAIGHT in your code.
3. The train starts at speed
5, lights
off.
4. The
train keeps running at speed 5 until one of the four buttons is pushed.
-
If
PB1 is pushed, the train should move towards and
park in front of stopper S1.
-
If
PB2 is pushed, the train
should move towards and park in front of stopper
S2.
-
If
PB3 is pushed, the train
should move towards and park in front of stopper
S3.
-
If
PB4 is pushed, the RR
system should be shuttled down immediately.
On the due day,
each team needs to demo the project to the class in the lab.
Grading
To
test your code, I will randomly park the train in one of the two
positions, press PB1, PB2 and PB3 in a random
order, and then press PB4. You will be awarded
 |
A, if all push
buttons work as required, |
 |
A-, if any three
push buttons work, |
 |
B+, if any two
push buttons work, and |
 |
B, if only one
push button works. |
Demo cutoff: 7:15 PM.
|