Cerebro#

Introducción#

El VEX EXP Brain ejecuta y gestiona todo el código de un proyecto. Ofrece cinco funciones principales que puedes usar en tu código: leer datos de la batería del robot EXP, usar los botones, acceder a una tarjeta SD insertada, controlar el tiempo con un temporizador integrado e interactuar con dispositivos conectados a los puertos de 3 cables.

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

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

  • button – Allows detecting button presses and assigning functions to button events on the EXP Brain.

  • screen – Allows drawing, printing, and interacting with the EXP 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 EXP Brain’s 3-Wire Ports. Each port is identified by a letter (a through h).

This page uses brain as the example EXP 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 EXP Brain.

  • Brain – Creates a EXP Brain.

Nota: Se crea automáticamente un Cerebro al inicio de cada proyecto VEXcode EXP.

programa_stop#

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 EXP 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()