Skip to main content

Moving Through a City
Lab 2 - Self-Driving Car Obstacle Challenge

Teacher Portal

Play

Part 1 - Step by Step

  1. InstructInstruct students that they will be creating an obstacle and coding their 123 Robot to move around the obstacle. Each group will need to set up 2-4, 123 Tiles for the 123 Robot to drive on.
    Video file
  2. ModelModel the steps needed to complete the challenge:
    • Show students how to snap their 123 Tiles together for the challenge. 
    • Demonstrate how to connect their 123 Robot to their device. Ensure students are following along.  
    • Show the commands that they will be using to code their 123 Robot. These commands include the Drive for (steps) block, Turn right block, Turn left block, and the When started block. 
    • Model how to use these commands in their project by sequencing them together. 
    • Then, once a sequence of code is created, show students the steps needed to download and run their project on their 123 Robot. 
    • Model for students the language that should be used within their group when planning their project. Some examples could include, “the 123 Robot will have to move forward this far” or “the 123 Robot will have to turn this much once it gets close to the obstacle.”
    Commands in VEXcode 123
    Commands in VEXcode 123
  3. FacilitateFacilitate a discussion as students are engaging in the activity by asking the following:
    • Can you show me using your hands how the 123 Robot will navigate around the obstacle?
    • What commands did you use in your code? Can you explain why you used them?
    • Would your 123 Robot move differently if you change the sequence of your commands? Why or why not?
    • Did you write something in your code that did not work out when you tested it? If so, how did you fix it?
    Group Discussion
    Group Discussion
  4. RemindRemind students that their first attempt of their solution will not be correct or run properly the first time. Encourage multiple iterations and remind students that trial and error is a part of learning. Ask students questions such as:
    • Did your code work the first time? If not, what do you think needs to change?
    • Did you check the sequence of your commands? Are they in the correct order?
    • What did you learn from testing your code?
  5. AskAsk students how navigating around an obstacle can be useful in real life? Would you be able to tell someone who is driving how to move around an obstacle?

Mid-Play Break & Group Discussion

As soon as every group has accomplished navigating their 123 Robot around the obstacle, come together for a brief conversation.

  • What problems did your team face during this challenge? Did any teams face the same problems?
  • How did the 123 Robot move to avoid the obstacle?  
  • Did your project work the first time? Did you have to go back and fix problems?
  • Do you think Computer Scientists and Engineers get it right the first time? Or do they make mistakes then learn from their mistakes when trying to solve problems?

Part 2 - Step by Step

  1. InstructInstruct students that they will be coding their 123 Robot to move around their obstacle again. But this time it will be pulling a trailer! Students should build a trailer out of recycled materials and attach it to the 123 Robot. How will adding the trailer change their code?
    Move Around the Obstacle with a Trailer
    Move Around the Obstacle with a Trailer
  2. ModelModel the steps needed to complete the challenge:
    • Demonstrate for students how to make the trailer using recycled materials. 
    • Show students how to attach their trailer to the 123 Robot. 
    • Show and explain to students how to edit their code from Play Part 1, so that they do not have to start over. They just need to move the VEXcode 123 blocks around, or add new blocks. 
    • Model for students the language that should be used within their group when planning their project. Some examples could include, “the 123 Robot will have to move forward this far” or “the 123 Robot will have to stop and then turn to drive around this obstacle.”
    Edit Your Code
    Edit Your Code
  3. FacilitateFacilitate a discussion as students are coding their 123 Robot:
    • How does the 123 Robot move differently when pulling a trailer? How are its movements the same?
    • How does pulling a trailer change the code in your VEXcode 123 project?   
    • What commands did you change? Why?
    • Did you include something in your code that did not work out when you tested it? If so, how did you fix it?
    Group Discussion
    Group Discussion
  4. RemindRemind students that their first attempt of their solution will not be correct or run properly the first time. Tell students to use problem solving strategies such as debugging.
  5. AskAsk students to think about what it would like to be a professional driver.
    • How do you think driving a car and driving a tractor-trailer truck would be similar? How would they be different?