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 [◀ v] button pressed?>

Parameter

Description

button

Which button to use:

  • Check

  when started
  [Display a message when the Brain's button is pressed.]
  wait until <Brain [Check v] button pressed?>
  print [Check was pressed!] on screen ▶

Battery voltage#

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

  (battery voltage in volts)

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.

  (battery current in 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.

  when Brain [◀ v] button [pressed v]  :: 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#
  when Brain [◀ v] button [pressed v]  :: hat events
  [Display a message when the Brain's button is pressed.]
  print [Left arrow pressed!] on screen ▶