Skip to main content
Teacher Portal

Background

The Mars Rover: Surface Operations Unit will familiarize you and your students with building VEXcode 123 projects to solve a problem. The actions of the Perseverance rover and the Mars 2020 Mission are used as inspiration for the challenges the students will work through using VEXcode 123 and the 123 Robot. The projects they create will need to be correctly sequenced to collect the samples and 'bury' them.

NASA’s Mars 2020 Mission

NASA’s Mars 2020 Mission addresses high-priority science goals for Mars exploration: life, climate, geology, and humans. The Perseverance rover will be completing surface operations to gather data to help inform the research on the Red Planet.

The surface of mars with a mars rover nearby. Tire treads in the dirt show where it has been driving.
Credit: NASA/JPL

What is a rover?

A rover is a device designed to move across the solid surface of a planet or other celestial body (like the Moon). Some rovers are designed to transport members of a space crew, while others are partially or fully autonomous robots. These robots are generally tasked with collecting information about the terrain and collecting samples of rocks, dirt, soil, or even liquids.

A close-up of the Perseverance rover on Mars, with large wheels and a variety of sensors and mechanical arms attached.
Credit: NASA/JPL-Caltech

What are surface operations?

Surface operations are the scientific studies that the rover will be completing on Mars. These are all focused on finding, collecting, and caching geological samples. To begin, Perseverance will look for compelling rocks. A rock could be considered compelling if it has the possibility to have preserved chemical traces of ancient life or to have been altered by an environment that supported microbial life.

After identifying the compelling rocks, Perseverance will drill out a sample, place it in a sealed tube, and cache them on the surface. Depot caching, used during this mission, is where multiple samples are left or buried at the same location. A future mission will then be able to retrieve these samples and return them all together to the scientists on Earth.

How is sequencing used in this Unit?

A sequence is the specific order in which behaviors are performed. An action or event leads to the next ordered action in a sequence. Sequencing is important for the 123 Robot, because the robot will only move exactly as the commands tell it to.

In the animation below, you can see how the project starts with the {When started} block at the top of the project, then each block is executed in order from top to bottom. The 123 Robot drives forward four spaces on a 123 Field, waits 2 seconds, then plays a sound. The green Highlight Feature around the blocks indicates which individual block is running at that moment. This can provide students with immediate feedback to connect the behaviors of the 123 Robot with specific VEXcode 123 blocks.

Video file

Steps to Sequence a Project

  1. First, identify the goal —what needs to be done? For example, drive from the start to the first sample.
    Top down view of a 123 field that consists of a 2 by 2 square of 123 Field Tiles. Two symbols are marking a start position and the sample's position. The starting position is 2 to the right from the bottom left corner, and the sample is 2 to the right and 4 up from the bottom left corner.
  2. Then, break down the steps needed to accomplish the goal, and identify the blocks needed to accomplish these steps. Here you will need to move forward 4 steps to reach the sample, wait 3 seconds, then play a sound to indicate the sample was collected. This can be accomplished with the [Drive for], [Wait], and [Play sound] blocks. Three VEXcode 123 blocks. The first is a Drive for block reading 'drive forward for 1 step', the second is a Wait block reading 'wait 1 second', and the third is a Play sound block reading 'play sound honk'.

    [Drive for], [Wait], and [Play sound] blocks

  3. Next, plan the sequence of the project by dragging the matching blocks into the workspace and attaching them to the {When started} block from top to bottom. As each block is added, change the parameters to match the steps broken down previously. VEXcode 123 Blocks example that reads When started, drive forward for 4 steps, wait 3 seconds, and then play sound doorbell.

    Example sequence

  4. Select “Start” to test the project and see if the 123 Robot accomplishes the goal identified in the first step. VEXcode 123 Toolbar with the Start button called out in a red box, in between the Robot and Step icons.

    Select 'Start'

If you want to change your project, simply change parameters, or add and remove blocks from the project before testing again.

What is VEXcode 123?

VEXcode 123 is a block-based programming language used with the 123 Robot. A programming language is a set of rules in which symbols represent actions. Programming languages follow step-by-step instructions that a computer executes in order for a project to run. For more information on how to work with VEXcode 123, see the VEXcode 123 Section of the VEX Library.

What VEXcode 123 Blocks Do You Need?

The blocks in VEXcode 123 represent 123 Robot commands that are used to create a project in VEXcode 123. Below is a list of the main blocks used during this Unit.

VEXcode 123 blocks Behaviors
The {When start} block
The {When start} block begins running the attached stack of blocks when the project is started.
VEXcode 123 Drive For block that reads 'drive forward for 1 step'.
The [Drive for] block moves the 123 Robot forward or in reverse a given distance. Set how far the 123 Robot will move by entering a value into the oval.
VEXcode 123 Turn For block that reads 'turn right for 90 degrees'.
The [Turn for] block turns the 123 Robot in place to the left or right for a specified number of degrees.
VEXcode 123 Wait block that reads 'wait 1 second'.
The [Wait] block waits for a specific amount of time before moving to the next block in a project.
VEXcode 123 Play Sound block that reads 'play sound honk'.
The [Play sound] block makes the 123 Robot play a specified sound.