Play
Part 1 - Step by Step
- InstructInstruct students that they are going to pretend that their Code Base robot is a Mars Rover. They will build a project in VEXcode GO to drive and collect a sample with the Code Base. This animation shows how the Code Base will move in this challenge.
Video file
- ModelModel for students how to build a project in VEXcode GO and test their projects on the Field.
- Begin by showing students how to connect the Brain on their Code Base to their device in VEXcode GO. Because connection steps vary between devices, see the Connecting articles of the VEXcode GO VEX Library for specific steps to connect the VEX GO Brain to your computer or tablet.
- They will also need to configure VEXCode GO for the Code Base. If necessary, model the steps from the Configure a Code Base VEX Library article and ensure students can see the Drivetrain blocks in the Toolbox.
- Drag a [Drive for] block into the workspace and attach it to the {When started} block.
- Model for students how to change the parameter of the [Drive for] block so the Code Base drives forward to the sample location. Note: 325 millimeters (mm) will drive the Code Base to the sample in the recommended Field setup.
- Then, have students drag in a [Set bumper color] block to have the Code Base signal that it is collecting a sample. This block will have the LED Bumper glow in the selected color.
- Next, have students drag in a [Wait] block, and set it to 3 seconds. These three seconds will allow time for the Code Base to "collect the sample."
- Students should then add another [Set bumper color] block and set it to off. This will have the LED Bumper turn off to signal that the sample has been collected.
- Once students have built their project, have them name their project as Collect 1 and save it to their device. See the Open and Save section of the VEXcode GO VEX Library for device-specific steps to save a VEXcode GO project.
- Model for students where to place their Code Base robots on the Field. The robot should start on the ‘X’ and face the circle where the sample will be collected.
- Once the Code Base is placed on the Field, have students select Start in VEXcode GO to test their projects.
- After the Code Base drives 325 mm to the collection location, the LED Bumper will glow red to indicate that it is collecting a sample. Students should place their “sample” item on top of the Code Base. After three seconds the LED will turn off to indicate that it is done collecting the sample.
- For groups who finish early and need additional challenges, have them add a [Turn for] block to the end of their project and test it to see what the Code Base will do. Ask them to experiment, and think of ways that this block could be useful in collecting samples on the Field.
- FacilitateFacilitate students working with VEXcode GO and testing their projects. While students are testing their projects, ask questions to help them think about the way their Code Bases are moving.
- Can you show me, using your hands, how your Code Base is going to move to collect the “sample”?
- How do you think your Code Base might move next if it was going to go back to the base?
- RemindRemind students that they can edit their projects, and retest them if their Code Base doesn’t get to the “sample” location the first time. Students should check the parameter in the [Drive for] block to make sure it has the correct distance needed to reach the sample.
- AskAsk students about what kinds of things they think the Mars rover is collecting on its missions. If they were scientists studying Mars, what would they want to learn about?
Mid-Play Break & Group Discussion
As soon as every group has collected the sample, come together for a brief conversation.
- Now that we’ve collected our sample what do you think our robot needs to do with it?
- How do you think we can code our Code Base to bring it back to the base? How will the robot need to move to deliver the sample to the base?
- What blocks do you think we might need to use in the next part of our project to do that?
Part 2 - Step by Step
- InstructInstruct students that they will be adding onto their project so the Code Base drives the “sample” back to the base. This animation below shows the Code Base driving to collect the “sample,” then return to the base to deliver the “sample.”
Video file
- ModelModel for students how to build onto their existing VEXcode GO project and test it on the Field.
- Your students may be able to build a project to complete the challenge on their own. However, for younger students, you may want to build the project together as a class, as you did in Play Part 1. If you are building the project together, you can follow the steps below.
- If students need to open their Collect 1 project, model the device-specific steps, as shown in the VEX Library articles in the Open and Save section.
- Have students add blocks to their VEXcode GO project to recreate the code in the image below. The red box indicates new blocks that need to be added to the project.
- If students have not used the [Turn for] block in a previous project, model how to drag the [Turn for] block into the project and change the parameter to 180 degrees. The turn distance is set to 180 degrees so that the Code Base turns around to face the base before driving forward to deliver the sample.
- Once students have built their project, have them name their project as Collect Return and save it to their device. See the Open and Save section of the VEXcode GO VEX Library for device-specific steps to save a VEXcode GO project.
- Have students place their Code Base on the Field, then select Start in VEXcode GO to test their projects.
- After the Code Base drives to the collection location, students should place their “sample” item on top of the robot when the LED Bumper glows red. The Code Base will then turn right 180 degrees and drive back to the base. After the robot returns to the base and the LED Bumper glows red, students should remove the “sample” from the Code Base. The LED Bumper will turn off to symbolize that the sample has been delivered.
- If students finish collecting and delivering the sample and have additional time, encourage them to try navigating to a different sample location. Use a dry erase marker to mark a sample location that is one step closer or further from the base, and have students adjust the parameters of their project to reach this new sample and deliver it to the base.
- FacilitateFacilitate students testing their projects and taking turns on the Field. As students are testing, ask them about the sequence of blocks in their project that enables the Code Base to move to the correct place.
- Can you show me, with your hands, how the Code Base would move if the [Turn for] block was set to left instead of right?
- What would happen if the turning part of the project came before the driving part? Would your Code Base be able to reach the sample?
Review the Using the VEX GO Sensors and the Coding with the VEX GO LED Bumper articles for additional information on the LED Bumper.
- RemindRemind students that they should check their project and compare it to the image of the project, before testing. If one student built the project in VEXcode GO, their partner can check the code, before placing the Code Base on the Field and starting the project.
- AskAsk students about how many samples they think the scientists are trying to collect to study Mars. Why would more samples be more helpful than fewer samples? Do you think our Code Bases could collect multiple samples?