Cerebro#

Un cerebro VEX V5 ejecuta y gestiona todo el código de un proyecto. Ofrece cinco propiedades principales que puedes usar en tu código, incluyendo la lectura de datos de la batería del robot V5, el uso de la pantalla táctil, el acceso a una tarjeta SD insertada, el seguimiento del tiempo con un temporizador integrado y la interacción con dispositivos conectados a los puertos 3-Wire.

A continuación se muestra una lista de propiedades disponibles:

  • battery – Provides access to information about the V5 Robot Battery, such as voltage, current, and charge level.

  • screen – Allows drawing, printing, and interacting with the V5 Brain’s touchscreen.

  • sdcard – Enables reading from and writing to files stored on an SD card inserted into the Brain.

  • timer – Provides access to the Brain’s internal timer for measuring elapsed time during projects.

  • three_wire_port - Provides access to 3-Wire devices connected to the V5 Brain’s 3-Wire Ports. Each port is identified by a letter (a through h).

This page uses brain as the example V5 Brain name. Replace it with your own configured name as needed.

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

  • program_stop – Immediately stops the currently running project.

Constructor – Inicializa manualmente un cerebro V5.

  • Brain – Creates a V5 Brain.

Nota: Se crea un cerebro automáticamente al inicio de cada proyecto VEXcode V5.

parada del programa#

program_stop immediately stops the currently running project.

Usage:
brain.program_stop()

Parámetros

Descripción

Este método no tiene parámetros.

Constructor#

Constructors are used to manually create Brain objects, which are necessary for configuring a V5 Brain outside of VEXcode.

Brain#

Brain creates a Brain.

Usage:
Brain()

Parámetros

Descripción

Este constructor no tiene parámetros.

# Create a Brain
brain = Brain()