Lab 5 – Tuesday, September 21, 2021

Topic: Loops, Selection, and Parallel Programming

Description: This lab session will focus on having your vehicle play “Follow the Leader”.

Details:
  1. The “leader” will be carrying the cuboid at most 1 inch above the floor. Which set of block colors in view is arbitrary.
  2. The leader may not change directions at any given time.
  3. The leader may change speed to increase/decrease distance but needs to move slowly!
Components:
  1. Go to Units and select Robot Trainer. Complete the Objects and Obstacles tutorial.
  2. Use the ultrasonic sensor to stay between 15 and 21 centimeters behind the leader and adjust the speed of the vehicle as the leader adjusts their speed. Utilize variables to adjust the movement speeds.
  3. If the leader gets to within 6 centimeters, have your vehicle stop moving. If the leader moves away, have your vehicle start moving again.
  4. Using parallel programming and the existing color sensor that is facing down, stop your vehicle if it runs over a red spot. The spot will be bigger than the vehicle.
  5. 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.
Extra Credit:
  1. Use parallel programming to display the current distance.
  2. Create your own block to follow 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