Part 1 - Step by Step
- InstructInstruct students that they are going to build a project in VEXcode GO to drive the Code Base to collect a Martian rock sample (the Red Disk) with the Electromagnet, then return it to the ‘Mars Base’ (the starting point).
- Students will build this project with you then test it on the Mars surface (the Field). This animation shows how the Code Base will move when this project is started.
Video file
- Students will build this project with you then test it on the Mars surface (the Field). This animation shows how the Code Base will move when this project is started.
- ModelModel for students how to build the 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.
- Then start to build your project together. First, drag a [Drive for] block into the workspace and attach it to the {When started} block. Change the distance parameter to 400 mm. This will drive the Code Base just past the Red Disk to collect it.
- Add the [Energize electromagnet] block to the project. This will cause the Electromagnet to pick up the Disk.
- Add the [Turn for] block and set turn value to 180 degrees so that the Code Base turns around in order to drive back to the Mars Base.
- Add another [Drive for] set to drive forward for 400 mm, and another [Energize electromagnet] block and set it to ‘drop.’ This will have the Code Base deliver the Disk to the base. The complete project should match the image below:
- Have students name their project as Geo Sample 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 how to test their project on the Field.
- First, show them how to place their robot at the starting point (the Mars Base) and the Red Disk on the Field as shown in the image below. Use the grid lines on the Field to help with alignment. The Disk and the Electromagnet can both be lined up on intersecting grid lines of the Field, to make it easier for students to be set up for success when they test their projects.
- Once the Code Base is in place, select 'Start' in VEXcode GO to test the project.
- Students will need to select the 'Stop' button in the VEXcode GO Toolbar to stop the project.
- For students who finish early and need additional challenges, have them move the Red Disk further away. Can they adjust their code to have the Code Base collect the Disk?
- FacilitateFacilitate a conversation with students as they test their projects.
- How does the Code Base rover move in this project?
- How does the Code Base rover know when to energize the Electromagnet?
- How did we code the robot to return to the base?
Focus on the concept, not the precision. The goal of this Lab is to focus on the concept of using the Electromagnet in a project. If students slightly misaligned their Code Base, or the Disk is not exactly in the right place when they drive toward it, remind them that it is ok to move the Disk slightly to make sure it gets picked up by the Electromagnet.
- RemindRemind students that even though this is a small project, they may make mistakes, and it may take more than one try to have their project work successfully.
- Students should check the parameter in the [Drive for] block to make sure it has the correct distance needed to reach the sample.
- They should also check that the parameter in the [Turn for] block is set to have the Code Base turn all the way around.
In order to encourage students to embrace their mistakes along the way, ask questions such as:
- What mistake did you make that taught you something new?
- What part of the Lab made you think hard?
- AskAsk students about the different kinds of rock and soil samples that they think the Perseverance Rover is collecting on its mission. If they were scientists studying Mars, what would they want to learn about? What sensors could the rover use to investigate this?
Mid-Play Break & Group Discussion
As soon as every group has coded their Code Base to collect and return the Red Disk, come together for a brief conversation.
- How does the Electromagnet work in our project? What blocks control the Electromagnet?
- How did you make the Electromagnet drop the Disk?
- What if you needed to collect a Disk from a different location? How could you change your project? What parameters would you change?
Part 2 - Step by Step
- InstructInstruct students that they are going to apply what they learned in Play Part 1 to iterate on their projects to make the Code Base collect and return the Red Disk from a new location. They can change parameters or blocks in their projects to have the Code Base drive to this new location.
- Show students the new Field setup and provide them with the 200 millimeter (~8 inches) drive distance so that they can focus on the code for this project.
- The following animation shows one possible way that the Code Base can move to complete the challenge.
Video file - ModelModel for students how to get started with their projects in VEXcode GO.
- If necessary, show 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.
- 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.
- Have students name their project as Geo Sample 2 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.
If necessary, model for students how to test their project on the Field.
- Show them how to set up to test by placing the Code Base at the Mars Base. Refer to the Play Part 2 Field Setup image above if needed.
- Once the Code Base is in place, select 'Start' in VEXcode GO to test the project.
- Students will need to select the 'Stop' button in the VEXcode GO Toolbar to stop the project.
If students finish early, have them place a second Disk on the Field. Can they code their robot to collect and return both samples?
- FacilitateFacilitate a conversation with students as they build and test their projects, with questions such as:
- How does the Code Base rover need to move to collect the Disk? Can you show me with your hands?
- What blocks are you adding to your project to have your Code Base rover collect the Disk from the new location?
- How are you changing your code to have the Code Base deliver the Disk to the new location?
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.
There are many possible solutions for this challenge. The following is one example.
- Focus on the concept, not the precision. The goal of this Lab is to focus on the concept of using the Electromagnet in a project. If students slightly misaligned their Code Base, or the Disk is not exactly in the right place when they drive toward it, remind them that it is ok to move the Disk slightly to make sure it gets picked up by the Electromagnet.
- If students need additional support to connect the behaviors of the Code Base with the block commands in their project, 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. For more information on how to use the Project Stepping feature, view the Stepping Through Blocks tutorial in VEXcode GO.
- RemindRemind students to check the order (or sequence) of the blocks and the parameters each block is set to in their projects.
- What did you change in your project, and what stayed the same? How did you decide what blocks or parameters to change in your group?
- Was the Disk a longer or shorter distance away? How can you change the parameter in the [Drive for] block to find the right distance for the Code Base rover to travel?
Talk students through problem-solving each issue as you circle the classroom. This will be an iterative process, so remind students that scientists who code the Mars rovers also have to try multiple times to get the rover to move how they intended.
- AskAsk students about Mars rovers to connect their projects with real-life rovers. What tools or sensors do they think the rover have that enable them to analyze Martial rock and soil samples?