Imán#

Introducción#

El electroimán VEX GO permite que su robot interactúe con objetos magnéticos levantándolos y soltándolos.

For the examples below, the configured electromagnet will be named magnet. This name is used in all subsequent examples throughout this API documentation when referring to Magnet class methods.

A continuación se muestra una lista de todos los métodos:

Acciones: Activar o desactivar el electroimán.

  • energize — sets the state of the electromagnet to either pick up or drop objects.

Comportamiento#

energize#

energize sets the state of the electromagnet to either pick up or drop objects.

Usage:
magnet.energize(action)

Parámetros

Descripción

action

The state of the electromagnet to set:

  • BOOST — Enables the magnet to pick up objects.
  • DROP — Disables picking up objects and drops any held objects.

# Build Used: Super Code Base 2.0
def main():
    # Drop an attached Disk
    drivetrain.drive_for(FORWARD, 200, MM)
    magnet.energize(DROP)
    drivetrain.drive_for(REVERSE, 200, MM)

# Start threads — Do not delete
start_thread(main)