Brain#

Introduction#

Brain blocks allow your robot to return information about the battery connected to the EXP Brain, such as battery voltage, current, and charge capacity.

Below is a list of available blocks:

  • Brain button pressed? – Returns whether a specified button on the Brain is currently pressed.

  • Battery voltage – Returns the voltage of the EXP Brain’s battery, ranging from 10.0V to 14.4V.

  • Battery current – Returns the electrical current drawn from the battery, ranging from 0.0A to 20.0A.

  • Battery capacity – Returns the remaining charge level of the battery, from 0% to 100%.

  • when Brain button – Runs the attached stack of blocks when a specified button on the Brain is pressed or released.

Brain button pressed?#

The Brain button pressed? block returns a Boolean indicating 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 [ 键按下了?>

Parameter

Description

button

Which button to use:

  • Check

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

Battery voltage#

The Battery voltage block returns the voltage of the EXP Brain’s battery, ranging from 10.0V to 14.4V.

(电池电压伏特值)

Parameters

Description

This block has no parameters.

Battery current#

The Battery current block returns the electrical current drawn from the battery, ranging from 0.0 to 20.0 Amps.

(电池电流安培值)

Parameters

Description

This block has no parameters.

Battery capacity#

The Battery capacity block returns the remaining charge level of the battery as a percent.

(battery capacity in %)

Parameters

Description

This block has no parameters.

when Brain button#

The when Brain button block runs the attached stack when a specified button on the Brain is pressed or released.

当Brain [ 按键 %2  :: hat events

Parameter

Description

button

Which button to use:

  • Check

state

When to run the attached stack of blocks:

  • pressed
  • released

Drive forward until an object is detected within 200 mm#
当Brain [ 按键 %2  :: hat events
[Display a message when the Brain's button is pressed.]
在屏幕上打印 [Left arrow pressed!]▶