Task #7 – Road Trip
Mission:
You and Alex (your friend) have decided to drive to a movie. Before you can leave home, you need to prove to your parents that you really know how to drive a car. Your mission is to prove how responsible you are by simulating your trip to the movies using the VEX parts. Your group must build a VEX model of a car with four motors. Your program should start with a bumpSwitch.
Only 1 person in your group needs to write the program. You will have to setup your Motors as follows:
Motor Ports
1-LtFront
2-LtRear (You will need a motor cable for this motor)
9-RtFront (You will need a motor cable for this motor)
10-RtRear
Program
Make it a Continuous Loop.
No If Statements.
For each segment you need to use the bumpSwitch to start all 4 motors, figure out the wait time, and stop all 4 motors.
untilTouch, bumpSwitch
start LtFront, 35
start LtRear, 35
start RtFront, 35
start RTRear, 35
wait, 1
stop LtFront
stop LtRear
stop RtFront
stop RtRear
*You might need to reverse some of your motors in the Motor and Sensor window.
*If you want the car to go forward your speeds need to be positive. If you want your car to go backward your speeds need to be negative.
*If you want to turn your car to the left, your LtFront and LtRear speeds need to be negative and your RtFront and RtRear need to be positive.
*If you want to turn your car to the right, your RtFront and RtRear need to be negative and your LtFront and LtRear speeds need to be positive.
Here is Your Itinerary:
1. Start off of the cardboard.
2. Drive to Alex's House and park in his driveway.
3. Back out of Alex's driveway.
4. Turn and drive forward to the movie theater.
5. Back out of the movie theater.
6. Turn and drive forward to Alex's house.
7. Back out of Alex's driveway.
8. Turn and drive forward back to your house.