Coding with the VEX GO Electromagnet

The VEX GO Electromagnet is used to transport Disks.

Electromagnet with its cable plugged into one of the Brain's Smart Ports.

Note: In this article, the example project uses the Code Base - Eye + Electromagnet GO Build.


How the Electromagnet is Used

The Electromagnet is used to have your robot be able to pick up and drop Disks.

Code Base Eye + Electromagnet GO Build with a green Disk piece being picked up and carried by the Electromagnet.

The [Energize electromagnet] block is used to ‘boost’ and ‘drop’ Disks.

VEXcode GO Energize electromagnet block that reads Energize electromanget to boost.

The ‘boost’ setting allows you to pick up a Disk.

VEXcode GO Energize electromagnet block with its dropdown menu open to demonstrate that the magnet's setting can be changed to boost or drop.

The ‘drop’ setting allows you to release a Disk.

VEXcode GO Energize electromagnet block with its dropdown menu open to change the setting from boost to drop.


Transport Disk Example Project

The code below will pick up and transport a Disk to a new location with the Code Base.

VEXcode GO blocks project that uses the Electromagnet to transport a Disk. The project reads When started, energize electromagnet to boost, drive forward for 200 mm, energize electromagnet to drop, and finally drive reverse for 200 mm.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: