Skip to main content

Mars Rover-Landing Challenge
Lab 2 - Clear the Landing Area

Teacher Portal

Play

Part 1 - Step by Step

  1. InstructInstruct students that they are going to be challenged to create a project to have the Code Base rover detect all the obstacles in the Mars Landing area. They will be encouraged to build onto their project from Lab 1.

    The following animation shows one possible way that the Code Base rover could be coded for the Clear the Landing Area Challenge. 

    Video file
  2. ModelModel for students how to get started with their projects in VEXcode GO.

    If necessary, model for students how to test their project on the Field.

    • Show them how to place the Code Base rover on the starting point marked with the "X."

      image of field set up with 3 obstacles and an X to mark the starting point for the Code Base rover. this is just a suggestion, the field can be set up any number of ways
      Play Part 1 Field Setup

    • Ensure that the Eye Sensor, located on the front of the robot, is facing the first obstacle.

      image of the Code Base with the Eye Sensor facing the obstacle on the field
      Eye Sensor faces the obstacle

    • Place the Code Base rover on the Field and select 'Start' in VEXcode GO to test their projects.

      image of the Start button called out on the VEXcode GO toolbar
      Select 'Start' to test the project

    • Students should remove the obstacles after they are detected by the Code Base.

    • Students will need to select the 'Stop' button in the VEXcode GO Toolbar to stop the project.

      image of the Stop button in the VEXcode GO Toolbar
      Select 'Stop'

    • Note: If students are using a forever loop, the Code Base will not stop until the Stop button is selected. In this scenario, have students stop their project when the Code Base has detected all the obstacles, has repeated a loop four times without detecting an obstacle, or if it gets stuck at the edge of the Field.

    • For groups who finish early and need additional challenges, have them experiment with different starting points. Does their project still work?

  3. FacilitateFacilitate a conversation with students as they experiment with their projects.
    • Prepare students for the trial and error that is an intrinsic part of the experimentation that they will engage in with this challenge. You may want to use the Problem Solving Cycle graphic from the Background page as a visual aide to establish a structure for the problem-solving process with your students.

    image of the 123 Student Problem Solving Process
    Student Problem-Solving Cycle

    • If students are using a loop in their project with a [Forever] block or [Repeat] block, but the Code Base is not moving as intended, they may not have all the necessary blocks inside the loop, or they may sequence the blocks inside the loop in a way that causes the Code Base to move in an unintended way.
      • Use the Project Stepping feature to help students go through their project one block at a time to see how each block is being executed in their project. This will allow students to see how the loop functions in their project and will give them visual feedback to show which blocks may be causing the error, so debugging can become a more targeted and efficient process. For more information on how to use the Project Stepping feature, see the Stepping Through a Project in VEXcode GO Knowledge Base Article
    • Remind students that they can also use the Highlight feature to see which blocks are being executed and when as they run their projects. The following questions can be used to encourage students to identify how a loop affects the project flow with the Highlight feature.
      • How does the highlight move when there is a loop in our project? 
      • Which VEXcode GO block creates the loop?
      • Which blocks are repeated in your project?
    • If the Code Base rover is not turning, students may not have added the [Turn for] block. Show students how to add the [Turn for]  block so that the robot changes direction after it detects an obstacle, otherwise, the Code Base will just drive forward and stop. Since students may not be familiar with angles, you may want to provide several angles for them to experiment with such as 60, 90, 120 degrees. 
      • Remind them that they can change the turn angles in the input oval in the [Turn for] block. If experimenting with turn angles, ask students how changing this parameter affects the movement of the Code Base. What would happen if we increase the turn angle? How does it change the movements of the Code Base rover? Does this change have the Code Base rover detect more obstacles? If not, try a different turn angle.

    image of turn for block with the input oval highlighted
    Change Turn Angle in the [Turn for] block

     

  4. RemindRemind students that this challenge requires playful exploration and there will be cycles of trial and error. They will make mistakes in their projects as they experiment, and each time they make a mistake in their code, they have a chance to learn something new! Help students to identify where in the code there was a problem and tease out ideas for addressing the problem.
    • Did something go wrong? Great! Where in the code is the problem?  How can you change that block? 
    • Do you need a different block or do you need to change the parameters in this one?
    • What is your favorite mistake so far? What did you learn from it?

  5. AskAsk students how they think the real Mars rover could use a loop and eye sensor to detect obstacles on the ground before it lands.

Mid-Play Break & Group Discussion

As soon as every group has experimented with their projects to solve the challenge, come together for a brief conversation.

Ask students to show their projects and describe what the Code Base is doing. This is a chance to check in on the students' progress and troubleshoot.

  • What was working well in your project?
  • What challenges have you faced in your project?

Ensure that students understand that they can use a loop to have the Code Base repeatedly check for obstacles on the Field.

  • Have they used a loop to have the Code Base rover detect multiple objects? If not, remind students about the [Forever] and [Repeat] blocks you talked about in the Engage section.
  • If they are using a loop, how are they using it? What blocks are they using to create the loop in their project? 
  • How does the sequence of the blocks in the loop affect the behaviors of the Code Base rover?
  • What happens if some of the blocks are not in the [Forever] or [Repeat] loop? Will those blocks be repeated?

Prepare for the challenge variation in Play Part 2:

  • What if we change the location of the obstacles? Will this project still work? Why or Why not?

Part 2 - Step by Step

  1. InstructInstruct students that they are going to move the obstacles on the Mars landing area and continue to experiment with their projects. The goal is to have the Code Base rover detect all the obstacles on the Field, even if their location changes! Encourage them to use what they have learned about loops and the [Repeat] or [Forever] block to update their projects. View the animation below for one example of how a Code Base rover might complete this challenge.
    Video file
    • Note that the animation stops after all of the objects are detected and removed, but a [Forever] loop would make the Code Base rover run forever in that loop until the project is stopped.
  2. ModelModel for students how set up the Field and test their project.
    • First, show them how to place the obstacles in new locations on the Field, and choose a starting point and mark it with an “X.” The following is one possible way to set up the Field.
      image of new field set up with 3 obstacles and an X to mark the starting point for the Code Base rover. objects should be in a different location, starting point should stay the same as Play Part 1
      Play Part 2 Field Setup Example
      • Once the obstacles and Code Base are in place, they can select ‘Start’ in VEXcode GO to test their projects.
        image of Start button on the VEXcode GO Toolbar
        Select 'Start' to test the project
      • Students will need to select the “Stop” button in the Toolbar to stop the Code Base rover.
      • There are many possible solutions for this challenge. The following is one example for reference.
        image of possible solution for the Clear the Landing Challenge
        Possible Solution
  3. FacilitateFacilitate a conversation with students as they test their projects.
    • If students need help making the Code Base rover repeat sections of code to detect all the obstacles on the field, suggest that they use a [Repeat] block or a [Forever] block as you talked about during the Engage section, and show them how to use it in their projects. Encourage them to check to make sure the entire project is inside the C-block, as shown below.

    image of a Forever block being adde to the VEXcode GO project. The Forever block wraps around all the blocks in the project
    Add a [Forever] Block

    • If students have built a project, but it isn’t detecting all of the objects, encourage them to experiment with turn angles, give them the following turn angles to experiment with such as 60, 90, and 120 degrees. How do the turn angles affect the movement of the Code Base rover?

    image of the turn for block with the input oval highlighted
    Changing the Turn Angle

    Engage students in further discussion as they build their projects to have them share their thinking as they iterate on and test their projects.

    • Which obstacle does the Code Base rover detect first in your project?
    • What does the Code Base rover do after it detects an obstacle? What blocks have you used to make it do this?
    • What blocks have you used to have the Code Base rover move to the next obstacle after one is cleared? 
    • How does your project have the Code Base rover clear the entire landing area?
  4. RemindRemind students to start from the same point for the tests. They just want to change one variable — the location of the obstacles.
    • Also, remind students to start with the Eye Sensor on the Code Base facing the first obstacle, this will have the Code Base travel to the first obstacle quickly and will enable students to have immediate success with their projects.
      image of the Code Base with the Eye Sensor facing the obstacle on the field
      Eye Sensor faces the obstacle

    Remind students of troubleshooting strategies as needed. 

  5. AskAsk students to think about how their project has changed throughout the challenge.
    • How has your project changed from the start of the lab until now?
    • What did you change in your project to make it work better?
    • What change did you make that made it less successful? How did you fix it?