BRAINS' built-in system (environmental) variables.
These variables are read-only, and can be used in your scripts.
See the Variables section for more detail on variables, as well as defining your own.
  • $SENSOR1 .. $SENSOR8
    The numeric value of a given sensor. Returned as a value from 0-100 depending on proximity to object.

    Example:

    if $SENSOR1 >=80 Then Say I am getting pretty close to an object.

    Range of values: 0-100
  • $OBJECT_DETECTED
    A Boolean value indicating whether or not any of the Robot sensors have detected an object recently.

    Range of values:
    0 or 1,
    True or False,
    Yes, or no.
  • $OBJECT_DETECTED_WHILE_MOVING
    A Boolean value indicating whether or not any of the Robot sensors have detected an object recently, while moving.

    Range of values:
    0 or 1,
    True or False,
    Yes, or no.
  • $DROPOFF_DETECTED
    A Boolean value indicating whether or not any of the Robot "beak" sensors have detected a drop-off, such as stairs, in its path.

    Range of values:
    0 or 1,
    True or False,
    Yes, or no.
  • $AUTO_SPEED
    Boolean value indicating the state of the Auto speed checkbox / setting.

    Range of values:
    0 or 1,
    True or False,
    Yes, or no.
  • $SAFETY
    Boolean value indicating the state of the Safety speed checkbox / setting.

    Range of values:
    0 or 1,
    True or False,
    Yes, or no.
  • $DATE
    The current date expressed as a string.

    Example usage:
    Say it is currently $DATE
  • $TIME
    The current time expressed as a string.

    Example usage:
    Say it is currently $TIME
  • $YEAR
    The current year expressed as a numeric value.

    Example usage:
    Say The year is $YEAR
  • $MONTH
    The current month expressed as a numeric value.

    Example usage:
    Say The month is $MONTH
  • $DAY
    The current day expressed as a string.

    Example usage:
    Say The day is $DAY
  • $HOUR
    The current hour expressed as a numeric value.

    Example usage:
    Say The current hour is $HOUR
  • $MINUTES
    The current minute expressed as a numeric value.

    Example usage:
    Say The current minute is $MINUTE
  • $SECONDS
    The current second expressed as a numeric value.

    Example usage:
    Say The current second is $SECOND

  • $DIGITALIO1 .. $DIGITALIO16
    The Boolean value of the state of a given Digital out port.

    Example usage:
    If $DIGITIALIO15 = TRUE Then Say The lights are on.

    Note: Use the command DIGTIALIO ON|OFF to toggle digital out ports. (See the commands section for more details).
  • $CUSTOMPHRASE1 .. $CUSTOMPHRASE10
    The string value of the custom phrases used by the speech panel. These are set in the speech settings, and can be used by your scripts as well as manually via the speech panel.

    Example usage:

    SAY $CUSTOMPHRASE1
  • $CURRENT_DIRECTORY
    The string value of the current directory path. The current directory is where BRAIN is installed.

    Example usage:
    Say BRAIN is installed in $CURRENT_DIRECTORY

    Example value:
    $CURRENT_DIRECTORY=C:\Program Files\BRAIN\
  • $BRAIN_SETTINGS_DIRECTORY
    The string value of the directory where BRAINS’ settings file is stored.

    Example usage:
    Say BRAIN' settings are located in $BRAIN_SETTINGS_DIRECTORY

    Example value:
    $BRAIN_SETTINGS_DIRECTORY =C:\Users\Samantha\Documents\BRAIN\
  • $CONTENT_DIRECTORY
    The string value of the directory where BRAINS’ content (media) is stored.

    Example usage:
    PLAY VIDEO $CONTENT_DIRECTORY\MyVideo.avi
    SHOW IMAGE $CONTENT_DIRECTORY\VactionPicture.jpg

    Example value:
    $CONTENT_DIRECTORY=C:\Users\Samantha\Documents\BRAIN\Content\
  • $MOTION_DETECTION_DIRECTORY
    The string value of the directory where BRAINS’ store images captured when motion detection is enabled.

    Example value:
    $MOTION_DETECTION_DIRECTORY=C:\Users\Samantha\Documents\BRAIN\Motion Detection\
  • $SYSTEM_DIRECTORY
    The string value of the directory where BRAINS’ system files are stored.

    Example value:
    $SYSTEM_DIRECTORY = C:\Users\Dave\Documents\BRAIN\System\
  • $THEMES_DIRECTORY
    The string value of the directory where BRAINS’ theme files are stored.

    These are the files that determine BRAINS' look and feel (colors schemes for example).

    Example value:
    $THEMES_DIRECTORY = C:\Users\Dave\Documents\BRAIN\Themes\
  • $USERS_HOME_DIRECTORY
    The string value of the directory of the currently logged in users home directory.

    Example value:
    $USERS_HOME_DIRECTORY = C:\Users\Dave\Documents\BRAIN\System\
  • $HELP_DIRECTORY
    The string value of the directory of BRAINS' help files.

    These are the HTML files that are displayed when the Help icon is clicked within BRAIN.

    Example value:
    $HELP_DIRECTORY = C:\Users\Dave\Documents\BRAIN\Help\
  • $LAYOUTS_DIRECTORY
    The string value of the directory of BRAINS' layout files.

    These are the files that determine how BRAINS' panels are laid out.

    Example value:
    $LAYOUTS_DIRECTORY = C:\Users\Dave\Documents\BRAIN\Layouts\
  • $SCRIPTS_DIRECTORY
    The string value of the directory of BRAINS' layout files.

    These are the files that store the individual scripts that you create with the script editor.

    Example usage:
    RUN SCRIPT $SCRIPTS_DIRECTORY\CheckWeather.txt

    Example value:
    $SCRIPTS_DIRECTORY = C:\Users\Dave\Documents\BRAIN\Scripts\