脑#
介绍#
VEX EXP 主控芯片运行并管理项目中的所有代码。它提供五个主要功能,您可以在代码中使用,包括从 EXP 机器人电池读取数据、使用按钮、访问插入的 SD 卡、使用内置计时器跟踪时间以及与连接到 3 线端口的设备交互。
以下是可供选择的房产列表:
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 (athroughh).
This page uses brain as the example EXP Brain name. Replace it with your own configured name as needed.
以下是可用方法列表:
program_stop– Immediately stops the currently running project.
构造函数 – 手动初始化一个 EXP Brain。
Brain– Creates a EXP Brain.
**注意:**每个 VEXcode EXP 项目开始时都会自动创建一个大脑。
程序停止#
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 EXP Brain outside of VEXcode.
Brain#
Brain creates a Brain.
Usage:
Brain()
参数 |
描述 |
|---|---|
此构造函数没有参数。 |
# Create a Brain
brain = Brain()