CS Level 1 - VEXcode VR Python

Unit 8 - Moving Disks with Loops

Lesson 2: Using the Electromagnet

Building the Project

• 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 command beneath the first comment and set the parameters to drive forward 750 millimeters (mm).

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).

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).

• Once the VR Robot reaches the first blue disk, the VR Robot must boost the Electromagnet using the energize command. Drag or type the energize command beneath the second comment.

• Next, the VR Robot will drive in reverse back to the starting point with the blue disk. Drag or type a drive_for command beneath the third comment. Set the drive_for command parameters to reverse 750 millimeters (mm).
• Once inside the blue goal, the VR Robot will need to release the blue disk. Drag or type an energize command beneath the fourth comment, and set the parameter to ‘DROP.’
• Open the Playground Window if it is not already open. Be sure the Disk Mover Playground opens, and run the project.

• The VR Robot picks up the first blue disk by energizing the Electromagnet, then drives in reverse back to the blue goal and drops the blue disk.

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