Skip to main content

For Your Information

When the electromagnet is added to the robot configuration, blocks from the 'Magnet' category appear in the Toolbox. One of these blocks is the [Energize electromagnet] block. 

  • By setting the electromagnet to boost, the magnet is energized and attracts a disk.
  • By setting the electromagnet to drop, the magnet is de-energized and repels a disk.

two magnet blocks

Now that you have created the 'Lab 7- Manual Move' project and obtained the coordinates for Point 1, 2 and 3, you will code the arm to pick up the red disk from the pick up location.

In VEXcode V5, follow the steps in this video to add the electromagnet to the robot configuration. 

Follow the steps in this video to remove the [Set manual movement] block and add blocks from the 'Magnet' category to the project. 

Follow the steps in this video to add [Joint move] blocks to the project and enter the coordinates for Point 1 and Point 2. 

Use your coordinates for Point 1 and Point 2, and not the ones shown in this video.

For Your Information

The [Wait] block waits for a specific amount of time before moving to the next block. In this project, the [Wait] block will be used to easily view the behavior of the arm as each [Joint move] block is run.

wait block

Follow the steps in this video to add [Wait] blocks and an [Energize electromagnet] block to the project to pick up the disk.

Place the red disk into the pick up location and then download and run the project. The arm will move to the pick up location, pick up the red disk, and lift it up and out of the pick up location. 

If your arm did not pick up the disk, notify your teacher. 

Lab 7 download and run_3

Lab 7 - Red-Step4_7

Once you have finished coding the arm to pick up the disk, stop the project.

Lab 7 stop_5