Magnet#
Energize Electromagnet#
The Energize Electromagnet block is used to set the VEX VR Robot Electromagnet to two different actions: boost or drop.
energize [Magnet v] to [boost v]
Select which mode for the Electromagnet to use:
boost - attracts an object to the Electromagnet.
drop - releases any object the Electromagnet is holding.
In this example, the robot will set its Electromagnet to boost before driving forward for 10 inches.
when started :: hat events
energize [Magnet v] to [boost v]
drive [forward v] for (10) [inches v] ▶