Skip to main content

Intro to Coding
Lab 2 - Robot Treasure Hunt

Teacher Portal

Play

Part 1 - Step by Step

  1. InstructInstruct students that they are going to use the Coder cards and Coder to create a project to make the 123 Robot reach the treasure on the map.
    Video file
  2. ModelModel for students how to plan the steps needed to move the 123 Robot from the start to the treasure. Then, model how to build that project with Coder cards.
    • Each group will need the following for the activity: 123 Robot, Coder, access to a 123 Field, Treasure Map Labels, and the following Coder cards:
      • One "When start 123"
      • Four "Drive 1"
      • One "Drive 2"
      • One "Drive 4"
      • One "Turn left"
      • One "Turn right"
      • One "Turn around"
    • Students will have to push to wake the 123 Robot. Model the steps for how to do this as shown in the animation below. Turn on sound for this animation. For more information about the 123 Robot, see the Using the VEX 123 Robot VEX Library article.
    Video file
    • Next, student will need to connect the 123 Robot to a Coder. You may need to review these steps. To connect the 123 Robot and Coder, press and hold the Start and Stop buttons on the Coder, and the Left and Right buttons on the 123 Robot for at least 5 seconds, until you hear the connected sound, and the indicator lights flash in time, as shown in the animation below. Turn on sound for this animation. For more information about the Coder, see the Using the VEX 123 Coder VEX Library article.
    Video file
    • When planning their projects, students can first  trace with their finger the path that they want the 123 Robot to travel to reach the treasure.
    • Ask students which behavior the 123 Robot needs to do first.
    • Then, ask students to show you a Coder card that matches that behavior.
    • Ask why they choose that card. How do they think the 123 Robot will move based on that card?
    • As you identify a successful card, add it to the Coder to begin building the project. Students should follow along with their Coder and Coder cards.
    • Repeat the process until you have the first two Coder cards added to your project ("Drive 4," and "Turn right"). Then, test the project together as a class.
    • Instruct students to work in their groups to add to the project to drive the 123 Robot to the treasure..
      Plan a path
      Plan a path
    •  For groups who finish early and need additional challenges, have them create a project that has the 123 Robot move to the treasure in a different way. Encourage them to map out their new path, identify the Coder cards needed, then build and test their new project to get to the treasure in a new way!
  3. FacilitateFacilitate a discussion with students as you walk around the room and check in with groups.
    • What are the steps the 123 Robot needs to take to get to the treasure?
      • Example: It drove forward 4, then turned right. What step is next? 
      • Asks students to be specific in their plan. How far forward? Is the 123 Robot driving forward 1 or 2?
    • If the group's project doesn't get all the way to the treasure, how can they fix it?
    • RemindRemind students that solving this treasure map will take many tries. Being wrong is not a bad thing as they learn to use the 123 Robot and Coder. Being wrong is a way to learn how to be better coders.

      If students need help with using the Coder and Coder cards, remind them of the process to insert, then start, then observe the 123 Robot.

      Video file
    • AskAsk students about times they have tried and failed. What did they learn from failing? Trying and failing will happen all the time, and it is a part of learning.

    Mid-Play Break & Group Discussion

    As soon as every group reaches the treasure, come together for a brief conversation.

    • Did the order of your cards matter to get your 123 Robot to the first treasure? 
      • Swap two cards from Play Part 1 and then start the project again, to illustrate that the order does matter for the cards.
         

    Part 2 - Step by Step

    1. InstructInstruct students that they will be changing their maps and creating a project for the 123 Robot to reach the treasure on the new map. Ensure students understand this new challenge.
      Treasure Map
      Change the map
    2. ModelModel for students how to change the location of the treasure and one obstacle. Students will still be using the same Motion Coder cards for this activity. As you change your example treasure map for students, have them change their maps at the same time.
      • Each group will need the following for the activity: 123 Robot, Coder, access to a 123 Field, Map, Treasure Map Labels, and the following Coder cards:
        • One "When start 123"
        • Four "Drive 1"
        • One "Drive 2"
        • One "Drive 4"
        • One "Turn left"
        • One "Turn right"
        • One "Turn around"
      • If your students may get too distracted or overwhelmed by switching the maps themselves, provide them with the second example treasure map set up to follow.
      • Model how to trace the new path with your finger on the map to plan their projects.
      Plan a path
      Plan a new path
      • Students should plan their project by laying out the Coder cards in the intended sequence on the table. Once they are satisfied with the plan, they will insert the cards into the Coder and test their project on the map. If the 123 Robot doesn't move along the path as intended they should identify if the sequence of the cards needs to change, or if they need to use different Coder cards to have the 123 Robot move on the desired path.
      • For groups who finish early and need additional challenges, have them create a project that has the 123 Robot move to the treasure in a new way. How many different paths can the 123 Robot take to get to the treasure?
    3. FacilitateFacilitate a discussion with groups as you circle the room and help groups, ensuring they are inserting coding cards correctly and working towards getting the 123 Robot to the treasure on the map. Ask students:
      • What are the steps the 123 Robot needs to take to get to the treasure?
        • What is the path your 123 Robot will travel?  What is the first step in that plan?
        • Asks students to be specific in their plan. How far forward? Is the 123 Robot turning right or left? Is it driving 1 or 2?
      • If the group's project doesn't get all the way to the treasure, how can they fix it?
      • How is this treasure map different from the first?
    4. RemindRemind groups that this is a brand-new treasure map and that will come with challenges. The answer will not be the same as the first time. They will need to break down each step for the 123 Robot using the Coder cards and put those steps into the Coder. They will need to try more than once to get it right.
    5. AskAsk groups if they have ever had to break something big down into smaller steps. What steps do they follow to get ready for school in the morning? How is this similar to what they are doing with the 123 Robot and Coder cards?