脑#
初始化大脑类#
Brain 是使用以下构造函数创建的:
brain
此构造函数不使用任何参数。
// 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.
大脑类有六个预定义属性:
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 formatbrain.ThreeWirePort.X, whereXis the port letter. For example,brain.ThreeWirePort.Arefers to the Sensor connected to port A.
类方法#
除了属性之外,Brain类还提供了可以直接使用的方法。
程序停止()#
The programStop() method stops the currently running project.
**返回:**无。