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
- Proporciona información sobre la batería del V5 Brain, incluida la capacidad, la temperatura, el voltaje y la corriente.Timer
- Proporciona funcionalidad para medir el tiempo transcurrido y asignar funciones a eventos basados en el tiempo en el V5 Brain.Screen
- Le permite mostrar texto, dibujar formas y asignar funciones táctiles en la pantalla del V5 Brain.SDcard
- Proporciona acceso a los archivos almacenados en la tarjeta SD del V5 Brain.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 formatbrain.ThreeWirePort.X
, whereX
is the port letter. For example,brain.ThreeWirePort.A
refers to the Sensor connected to port A.
Atributos
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.