Skip to main content

Lesson 5: Disk Mover Challenge

In the Disk Mover Challenge, the VR Robot must use the Electromagnet to pick up each disk and move it to the goal of the same color on the Disk Mover Playground. You will need to use nested loops and the Electromagnet along with blocks from the Drivetrain, Sensing, and Control categories to solve the Disk Mover challenge.

A top down view of the Disk Mover Playground in its starting state, with the VR Robot in the starting blue goal location. There are red boxes highlighting each set of 3 Disks, with an arrow pointing to their matching colored goals, indicating the goal of moving all Disks to the appropriate colored goal.

Learning Outcome

  • Apply blocks from the Drivetrain, Sensing, and Control categories in the correct sequence in order to have the VR Robot successfully complete the Disk Mover Challenge.

Putting It All Together

This Unit explores how to use the Electromagnet on the VR Robot to pick up and put down colored disks on the Disk Mover Playground. This Unit also combines skills learned in previous units such as using the Eye Sensor and Distance Sensor with a new block, the [Repeat until] block to navigate the Disk Mover Playground and to pick up disks.

The activities in this Unit require many repetitive movements. Using loops and nested loops in VEXcode VR projects allow the user to control the project flow and shorten a long list of repeated commands into just a few. Loops can also be used with Boolean reporter blocks, allowing the VR Robot to evaluate and respond to its environment, such as stopping and energizing the Electromagnet when the Down Eye Sensor detects a disk.

A VEXcode VR code snippet of a Repeat until block with the parameter set to Down eye near object? and a drive forward block inside the C. Outside the Repeat until block is a stop driving block and an Energize electromagnet to boost block.

Placing one loop inside of another loop is called ‘nesting.’ When loops are nested, the outer loop takes control of the number of times the inner loop executes. Nested loops are helpful in projects where a VR Robot repeats the same behaviors more than once. Nesting loops organizes and condenses a project.

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