#

介绍#

Brain blocks allow your robot to report information about the battery connected to the EXP Brain, such as battery voltage, current, and charge capacity. These blocks also allow you to respond to button presses on the EXP Brain.

以下是可用模块列表:

Brain button pressed#

The Brain button pressed Boolean block reports whether a specified button on the Brain is currently being pressed.

  • True – The specified button on the Brain is being pressed.

  • False – The specified button on the Brain is not being pressed.

<Brain [ 键按下了?>

范围

描述

按钮

要使用哪个按钮:

  • 检查

当开始
[Display a message when the Brain's button is pressed.]
等到 <Brain [Check v] 键按下了?>
在屏幕上打印 [Check was pressed!]▶

电池电压#

Voltage is the electrical pressure supplied to the battery. The Battery voltage reporter block reports the battery’s current voltage, which can help you check whether the battery is charged enough for the robot to run reliably, ranging from 7.0 to 8.0 Volts.

(电池电压伏特值)

参数

描述

此代码块没有参数。

电池电流#

Current is how much electrical flow the robot is using from the battery. The Battery current reporter block reports the battery’s current draw, which can help you see how hard the robot is working or whether motors may be under extra load, ranging from 0.0 to 15.0 Amps.

(电池电流安培值)

参数

描述

此代码块没有参数。

电池容量#

The Battery capacity reporter block reports the battery level, as a percentage from 0% to 100%.

(battery capacity in %)

参数

描述

此代码块没有参数。

当大脑按钮#

当按下或释放 Brain 上的指定按钮时,当 Brain 按钮 模块会运行附加的堆栈。

当Brain [ 按键 %2  :: hat events

范围

描述

按钮

Determines which button will trigger the event:

  • Check

action

Determines when the attached stack of blocks will execute: pressed will run when a button is pressed, and released will run when a button is released.

向前行驶,直到在 200 毫米范围内检测到物体为止#
当Brain [ 按键 %2  :: hat events
[Display a message when the Brain's button is pressed.]
在屏幕上打印 [Left arrow pressed!]▶