Lab 8 – Tuesday, October 19, 2021

Description: The final lab exercise using the original Lego robotic vehicle will be broken up over two lab sessions. This exercise will combine the components from previous labs.

Details:
  1. The vehicle will follow a black line.
  2. The vehicle will also be following the “leader” (the cuboid or another vehicle) which will be following the same line and will vary its speed slightly.
  3. Your vehicle must slow down if the leader gets to within 15 centimeters and speed back up if the distance increases again.
  4. If the leader gets to within 6 centimeters, have your vehicle stop moving. If the leader moves away, have your vehicle start moving again.
  5. If your vehicle runs over a red spot, it should stop.
  6. If someone (or something) runs into your vehicle from behind, it should sound an alarm (again please not too annoying, thank you!), spin around 180 degrees and stop.
  7. If the center brick button is pressed, have the brick say “Goodbye” (please at a low volume for everyone’s sake) and your vehicle should stop.
Components:
  1. You will need an ultrasonic sensor on the front of your vehicle.
  2. You will need a color sensor on your vehicle pointing down.
  3. You will need a touch sensor on the back of your vehicle facing out.
  4. Create your own block to follow the line.
  5. Create your own block to adjust the speed based on the “leader” movement.
  6. Create your own block to react to the touch sensor being pressed.
  7. Use parallel programming to deal with various stopping requirements.
Extra Credit:
  1. Have the display constantly update the distance between your vehicle and the “leader”.
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
This website is using cookies. More info. That's Fine