Introduction
Using Python with VEXcode VR requires a VR Enhanced or Premium license. Make sure you are logged in with your class code and that the VR Logo in the top left corner is grey or gold.
In this Unit, you will learn how to use the Electromagnet on the VR Robot to pick up and drop disks from one side of the Playground into the matching goal on the other side of the Playground, to solve the Disk Mover challenge. You will apply skills learned in previous units to create a project that uses VR Robot Sensors and loops to solve the Disk Mover Challenge.
On the Disk Mover Playground, the top half of the playground is divided into three vertical sections by walls. In each section, three Disks are evenly spaced in a line parallel to the walls. The lower half of the playground has three square goal areas along the bottom, that align with the sections of Disks above. Each section's Disks and goal have matching colors - the left section is blue, the center is red, and the right is green. The robot starts in the center of the blue goal in the lower left corner.
In the video clip below, the VR Robot drives forward to pick up the nearest blue disk with the Electromagnet, then turns around and drives to drop it in the blue goal. This is repeated for the remaining two disks. The VR Robot then turns right and drives to the red goal area. It then turns left and repeats the process of driving to pick up and drop each of the three red disks in the red goal. The robot turns right and moves to the green goal area, turning left and driving to pick up and drop the three green disks in the green goal.
The Disk Mover Problem
In the Disk Mover Challenge, the goal is to be able to drive the VR Robot to a disk, pick it up with the Electromagnet, drive it to a new location, and drop the disk. This same behavior sequence is repeated in order to move multiple disks on the Playground. There are many ways to solve the Disk Mover problem. Using strategies and tools we have used in previous Units, as well as some new tools, we can use the VR Robot to move disks in the most efficient way possible. First, we will learn about the Electromagnet, and how to use it in a Disk Mover solution.