Skip to main content

Lesson 2: Plan the Project

In this Lesson, you will learn how to use the [Energize Electromagnet] block to pick up and drop disks on the Disk Mover Playground. You will use the [Energize Electromagnet] block with Drivetrain blocks to pick up and move three blue disks into the blue goal in the mini challenge.

Learning Outcomes

  • Identify that the [Energize Electromagnet] block has two different modes: boost or drop.
  • Identify that the [Energize Electromagnet] block, when set to boost, attracts a disk to the Electromagnet.
  • Identify that the [Energize Electromagnet] block, when set to drop, releases the disk that the Electromagnet is holding.
  • Identify that the [Energize Electromagnet] block is a stack block that can be used with Drivetrain blocks to pick up disks.
  • Describe the program flow in a project that has the VR Robot pick up, carry, then drop a disk.

How to Use the Electromagnet

In this challenge, the VR Robot will complete four behaviors using the [Energize Electromagnet] and the [Drive for] blocks to place a blue disk in the blue goal. These steps are also reflected in the comments of the project being built.

  • First: The VR Robot will drive forward to the first blue disk.

    A top-down view of the Disk Mover Playground with the VR Robot in the lower left corner starting position. A dotted arrow from the front of the robot to the first blue Disk indicates the intended movement of the robot.

  • Second: The VR Robot will pick up the first blue disk.

    The VR Robot on the Playground with the Blue Disk attached to the robot's Electromagnet.

  • Third: The VR Robot will drive in reverse to the starting position in the blue goal.

    A top-down view of the Disk Mover Playground with the VR Robot at the first blue disk. A dotted arrow from the back of the robot to the blue goal indicates the intended movement of the robot back to the goal.

  • Finally: The VR Robot will drop the blue disk into the blue goal.

    The VR Robot in the blue goal on the Playground with the blue disk released and laying on the Playground beneath the robot.

  • This project will use comment blocks to help plan the behaviors of the VR Robot by organizing them into smaller sections within the project. While building the project, the blocks associated with each desired behavior will be placed beneath the matching comment.

    VEXcode VR Comment block from the Toolbox.

  • Start a new project in VEXcode VR and name the project Unit8Lesson2.

    The project name dialog box in the Toolbar of VEXcode VR is highlighted with a red box, to the left of the Select Playground button. The project name reads Unit 8 Lesson 2.

  • Drag four [Comment] blocks into the workspace. Add comments for each of the steps outlined above.

    A new VEXcode VR project with a When started block with four Comment blocks attached. The comments read as follows: 1. Drive to the first blue disk; 2. Pick up the first blue disk; 3. Drive in reverse to the blue goal; and 4. Drop the blue disk in the blue goal.

  • The first blue disk is 750 millimeters (mm) away from the starting point of the VR Robot on the Disk Mover Playground. Drag in a [Drive for] block beneath the first comment and set the parameter to 750 millimeters (mm).

    The VEXcode VR project from the previous step, with a Drive for block added beneath the first comment. The project now reads When started, then a comment of 1. Drive to the first blue disk, drive forward for 750mm, then the next three existing comments.

For Your Information

The distance between the starting point of the VR Robot and the first blue disk was estimated using the dimensions of each grid square. Each grid square on the Disk Mover Playground is 200 millimeters (mm) by 200 millimeters (mm).

A close up, top down view of the bottom left corner of the Disk Mover Playground, with dimensions of a grid square shown as 200mm wide by 200mm tall.

Using this information, it can be estimated that the first blue disk is 800 millimeters (mm) from the center of the VR Robot. Since the Electromagnet is on the front of the VR Robot, the distance between the Electromagnet and the first blue disk may be slightly shorter than the 800 millimeters (mm).

The VEXcode VR Robot in the blue goal in the corner of the Disk Mover Playground with the Electromagnet highlighted at the front of the robot, and a blue disk attached to the magnet.

Select the Next button to continue with the rest of this Lesson.