#

VEX V5 主控芯片运行并管理项目中的所有代码。它提供五个主要功能,您可以在代码中使用,包括从 V5 机器人电池读取数据、使用触摸屏、访问插入的 SD 卡、使用内置计时器跟踪时间以及与连接到 3 线端口的设备交互。

以下是可供选择的房产列表:

  • 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.

以下是可用方法列表:

  • program_stop – Immediately stops the currently running project.

构造函数 – 手动初始化 V5 大脑。

  • Brain – Creates a V5 Brain.

**注意:**每个 VEXcode V5 项目开始时都会自动创建一个大脑。

程序停止#

program_stop immediately stops the currently running project.

Usage:
brain.program_stop()

参数

描述

此方法没有参数。

构造函数#

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

参数

描述

此构造函数没有参数。

# Create a Brain
brain = Brain()