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.
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
- $OBJECT_DETECTED
- $OBJECT_DETECTED_WHILE_MOVING
- $DROPOFF_DETECTED
- $AUTO_SPEED
- $SAFETY
- $DATE
- $TIME
- $YEAR
- $MONTH
- $DAY
- $HOUR
- $MINUTES
- $SECONDS
- $DIGITALIO1 .. $DIGITALIO16
- $CUSTOMPHRASE1 .. $CUSTOMPHRASE10
- $CURRENT_DIRECTORY
- $BRAIN_SETTINGS_DIRECTORY
- $CONTENT_DIRECTORY
- $MOTION_DETECTION_DIRECTORY
- $SYSTEM_DIRECTORY
- $THEMES_DIRECTORY
- $USERS_HOME_DIRECTORY
- $HELP_DIRECTORY
- $LAYOUTS_DIRECTORY
- $SCRIPTS_DIRECTORY
-
$SENSOR1 .. $SENSOR8The 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_DETECTEDA 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_MOVINGA 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_DETECTEDA 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_SPEEDBoolean value indicating the state of the Auto speed checkbox / setting.
Range of values:
0 or 1,
True or False,
Yes, or no.
-
$SAFETYBoolean value indicating the state of the Safety speed checkbox / setting.
Range of values:
0 or 1,
True or False,
Yes, or no. -
$DATEThe current date expressed as a string.
Example usage:
Say it is currently $DATE
-
$TIMEThe current time expressed as a string.
Example usage:
Say it is currently $TIME
-
$YEARThe current year expressed as a numeric value.
Example usage:
Say The year is $YEAR
-
$MONTHThe current month expressed as a numeric value.
Example usage:
Say The month is $MONTH
-
$DAYThe current day expressed as a string.
Example usage:
Say The day is $DAY
-
$HOURThe current hour expressed as a numeric value.
Example usage:
Say The current hour is $HOUR
-
$MINUTESThe current minute expressed as a numeric value.
Example usage:
Say The current minute is $MINUTE
-
$SECONDSThe current second expressed as a numeric value.
Example usage:
Say The current second is $SECOND
-
$DIGITALIO1 .. $DIGITALIO16The 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 .. $CUSTOMPHRASE10The 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_DIRECTORYThe 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_DIRECTORYThe 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_DIRECTORYThe 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_DIRECTORYThe 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_DIRECTORYThe string value of the directory where BRAINS’ system files are stored.
Example value:
$SYSTEM_DIRECTORY = C:\Users\Dave\Documents\BRAIN\System\ -
$THEMES_DIRECTORYThe 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_DIRECTORYThe 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_DIRECTORYThe 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_DIRECTORYThe 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_DIRECTORYThe 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\