cerebro#

Inicializando la clase del cerebro#

El cerebro se crea utilizando el siguiente constructor:

brain

Este constructor no utiliza parámetros.

// Create a new object "Brain" with the brain class.
brain Brain;

This Brain object will be used in all subsequent examples throughout this API documentation when referring to brain class methods and attributes.

La clase cerebro viene con seis atributos predefinidos:

  • Battery - Provides information about the V5 Brain’s battery, including capacity, temperature, voltage, and current.

  • Timer - Provides functionality to measure elapsed time and assign functions to time-based events on the V5 Brain.

  • Screen - Enables you to display text, draw shapes, and assign touch-responsive functions on the V5 Brain’s Screen.

  • SDcard - Provides access to files stored on the V5 Brain’s SD card.

  • ThreeWirePort - Provides access to 3-Wire Sensors connected to the V5 Brain’s 3-Wire Ports. Each port is identified by a letter (a through h) and can be accessed using the format brain.ThreeWirePort.X, where X is the port letter. For example, brain.ThreeWirePort.A refers to the Sensor connected to port A.

Métodos de clase#

Además de sus atributos, la clase Brain proporciona un método que se puede utilizar directamente.

programaDetener()#

The programStop() method stops the currently running project.

Devoluciones: Ninguna.