Screen#
These commands only work with a VEX V5 Controller connected to the VEX EXP Brain.
print()#
The print(value, format, ...)
method prints text on the screen using the current cursor position.
Parameters |
Description |
---|---|
value |
The text to print. |
format |
Optional. A format specifier to be used when printing the value of variables. |
… |
Optional. A variable list of parameters to be printed with the format specifier. |
Returns: None.
// Print the number 1 on the screen at current
// cursor position.
Controller.Screen.print(1);
setCursor()#
The setCursor(row, col)
method sets the cursor position used for printing text on the screen.
The V5 controller can display at most 3 lines of text.
Parameter |
Description |
---|---|
row |
The cursor row: 1, 2, or 3. |
col |
The cursor column. The first column is 1. |
Returns: None.
column()#
The column()
method returns the current column where text will be printed, starting at 1.
Returns: The current column.
row()#
The row()
method returns the current row where text will be printed, starting at 1.
Returns: The current row.
clearScreen()#
The clearScreen()
method clears the whole screen.
Returns: None.
clearLine()#
There are two ways to clear a line on the Controller’s screen.
The clearLine()
method clears the row that the cursor is currently on.
Returns: None.
The clearLine(row)
method clears the specified row.
Parameter |
Description |
---|---|
row |
The row to clear: 1, 2, or 3. |
Returns: None.
// Clear row 2.
Controller.Screen.clearLine(2);
newLine()#
The newLine()
method moves the cursor to the beginning of the next line.
Returns: None.