Screen#
Introduction#
The Screen blocks control the V5 Brain’s touchscreen, allowing your robot to show text, numbers, and graphics, and respond to touch input.
By default, the font for printing to the Brain is monospaced small which has 12 rows and 48 columns.
For drawing, the Brain’s resolution is 480 x 240 pixels.

Below is a list of available blocks:
Cursor Print – Display text and manage the print cursor.
print on screen – Prints text, numbers, or variable values on the Brain screen.
set cursor to row column on screen – Moves the cursor to a specific row and column.
set cursor to next row on screen – Moves the cursor to column 1 of the next row.
clear row on screen – Clears a specified row of text.
screen cursor column – Reports the column number where text will be printed.
screen cursor row – Reports the row number where text will be printed.
Settings – Change the appearance of text and graphics.
clear screen – Erases all text and drawings from the screen.
set font on screen – Changes the font type and size for text display.
set print precision on screen – Sets how many decimal places to show when printing numbers.
set pen width on screen – Sets the thickness of drawn lines and shape outlines.
set pen / font color on screen – Sets the color of text, pixels, lines, and shape outlines.
set fill color on screen – Sets the fill color for drawn shapes.
Draw – Create shapes, lines, and graphics on the Brain screen.
draw pixel on screen – Draws a single pixel at a coordinate.
draw line on screen – Draws a line between two points.
draw rectangle on screen – Draws a rectangle using two corner points.
draw circle on screen – Draws a circle with a defined center and radius.
Touch – Detect touch input on the Brain’s screen.
screen pressed – Reports whether the screen is currently being touched.
screen position – Reports the selected x or y coordinate of the last screen press.
when screen – Runs attached blocks when the screen is pressed or released.
Cursor Print#
print on screen#
The print on screen stack block prints text, numbers, or variable values on the Brain screen at the current cursor position and font.
when started
print [VEXcode] on screen ▶
Parameters |
Description |
|---|---|
value |
The text, number, or variable value to display on the screen. |
and set cursor to next row |
Select the arrow ( ▶ ) to expand the block to say and set cursor to next row, so the cursor moves to column 1 of the next row after printing. |
Example
when started
[Display a message at the starting cursor position.]
print [Hello, Robot!] on screen ▶

set cursor to row column on screen#
The set cursor to row column on screen stack block moves the cursor to a specific row and column on the Brain screen. The next print on screen block will start printing at that location. How many rows and columns can comfortably fit depends on the selected font. With the default monospaced medium font, up to 8 rows and 13 columns can be displayed clearly. Text placed beyond this range may be cut off or become difficult to read.
Monospaced fonts have characters that are all the same width, making text placement consistent. In contrast, proportional fonts vary in character width, so some letters take up more space than others. However, regardless of which type is used, the set cursor to row column on screen stack block positions the cursor based on row and column size, not font style. The font size can be adjusted using the set font on screen stack block.
set cursor to row [1] column [1] on screen
Parameters |
Description |
|---|---|
row |
The row to move the cursor to. |
column |
The column to move the cursor to. |
Example
when started
[Display text starting at Row 3 Column 12.]
set cursor to row [3] column [12] on screen
print [Row 3, Column 12] on screen ▶

set cursor to next row on screen#
The set cursor to next row on screen stack block moves the cursor to column 1 on the next row on the Brain screen.
set cursor to next row on screen
Parameters |
Description |
|---|---|
This block has no parameters. |
Example
when started
[Display two lines of text.]
print [Line 1] on screen ▶
set cursor to next row on screen
print [Line 2] on screen ▶

clear row on screen#
The clear row on screen stack block clears a single row of text on the Brain screen.
clear row [1] on screen
Parameters |
Description |
|---|---|
row |
The row number to clear. |
Example
when started
[Only keep the text on row 1.]
print [This text stays] on screen ▶
set cursor to next row on screen
print [This text disappears] on screen ▶
wait [3] seconds
clear row [2] on screen
screen cursor column#
The screen cursor column reporter block reports the column number where text will be printed as an integer.
(screen cursor column)
Parameters |
Description |
|---|---|
This block has no parameters. |
Example
when started
[Display the cursor's current column.]
set cursor to row [3] column [15] on screen
print (screen cursor column) on screen ▶

screen cursor row#
The screen cursor row reporter block reports the row number where text will be printed as an integer.
(screen cursor row)
Parameters |
Description |
|---|---|
This block has no parameters. |
Example
when started
[Display the cursor's current row.]
set cursor to row [3] column [2] on screen
print (screen cursor row) on screen ▶

Settings#
clear screen#
The clear screen stack block clears all drawings and text from the Brain screen.
clear screen
Parameters |
Description |
|---|---|
This block has no parameters. |
Example
when started
[Draw a circle, and clear it after 2 seconds.]
draw circle [120] [120] [40] on screen
wait [2] seconds
clear screen
set font on screen#
The set font on screen stack block sets the font and size used for displaying text on the Brain screen. This font will apply to all subsequently printed text.
set font to [monospaced v] [medium v] on screen
Parameters |
Description |
|---|---|
style |
The font style: monospaced or proportional |
size |
The font size (examples below):
|
|
|
|
|---|---|---|
|
|
|
|
|
|
|
Example
when started
[Display text using a larger font]
set font to [monospaced v] [extra large v] on screen
print [VEX] on screen ▶

set print precision on screen#
The set print precision on screen stack block sets how many decimal places to show when printing numbers on the Brain screen. This print precision will apply to all subsequently printed numbers.
set print precision to [0.1 v] on screen
Parameters |
Description |
|---|---|
precision |
The print precision to use:
|
Example
when started
[Print 1/3 as 0.33.]
set print precision to [0.01 v] on screen
print ([1] [math_division v] [3]) on screen ▶

set pen width on screen#
The set pen width on screen stack block sets the thickness of drawn lines and shape outlines.
set pen width to [10] on screen
Parameters |
Description |
|---|---|
width |
The pen width, in pixels, from 0 to 32. |
Example
when started
[Draw a rectangle with a pen width of 10.]
set pen width to [10] on screen
draw rectangle [50] [50] [130] [60] on screen

set pen / font color on screen#
The set pen / font color on screen stack block sets the color of text, pixels, lines, and shape outlines.
set pen / font color to [red v] on screen
Parameters |
Description |
|---|---|
color |
The pen and font color to use:
|
Example
when started
[Draw a rectangle with orange borders.]
set pen / font color to [orange v] on screen
draw rectangle [50] [50] [130] [60] on screen

set fill color on screen#
The set fill color on screen stack block sets the fill color used when shapes are drawn.
set fill color to [red v] on screen
Parameters |
Description |
|---|---|
color |
The fill color to use:
|
Examples
when started
[Draw a purple rectangle.]
set fill color to [purple v] on screen
draw rectangle [50] [130] [100] [60] on screen

Draw#
draw pixel on screen#
The draw pixel on screen stack block draws one pixel at the selected x and y coordinate using the current pen color.
draw pixel [0] [0] on screen
Parameters |
Description |
|---|---|
x |
The x-coordinate to draw the pixel from 0 to 479. |
y |
The y-coordinate to draw the pixel from 0 to 239. |
Example
when started
[Draw the pixels marking the corners of a square.]
draw pixel [250] [100] on screen
draw pixel [275] [100] on screen
draw pixel [250] [125] on screen
draw pixel [275] [125] on screen
![]()
draw line on screen#
The draw line on screen stack block draws a line from the first screen coordinate (x1, y1) to the second screen coordinate (x2, y2) using the current pen width and pen color.
draw line [0] [0] [10] [10] on screen
Parameters |
Description |
|---|---|
x1 |
The x-coordinate in pixels of the start of the line from 0 to 479. |
y1 |
The y-coordinate in pixels of the start of the line from 0 to 239. |
x2 |
The x-coordinate in pixels of the end of the line from 0 to 479. |
y2 |
The y-coordinate in pixels of the end of the line from 0 to 239. |
Example
when started
[Draw a line from the top left to bottom right of the screen.]
draw line [0] [0] [479] [239] on screen

draw rectangle on screen#
The draw rectangle on screen stack block draws a rectangle using the current pen width, pen color, and fill color.
draw rectangle [0] [0] [10] [10] on screen
Parameters |
Description |
|---|---|
x |
The x-coordinate in pixels of the top-left corner of the rectangle from 0 to 479. |
y |
The y-coordinate in pixels of the top-left corner of the rectangle from 0 to 239. |
width |
The width of the rectangle in pixels. |
height |
The height of the rectangle in pixels. |
Example
when started
[Draw a rectangle on the screen.]
draw rectangle [50] [50] [130] [60] on screen

draw circle on screen#
The draw circle on screen stack block draws a circle using the current pen width, pen color, and fill color.
draw circle [0] [0] [10] on screen
Parameters |
Description |
|---|---|
x |
The x-coordinate in pixels of the center of the circle from 0 to 479. |
y |
The y-coordinate in pixels of the center of the circle from 0 to 239. |
radius |
The radius of the circle in pixels. |
Example
when started
[Draw a circle on the screen.]
draw circle [120] [120] [40] on screen

Touch#
screen pressed#
The screen pressed Boolean block reports whether the Brain’s touchscreen is currently being pressed.
True – The screen is being pressed.
False – The screen is not being pressed.
<screen pressed?>
Parameters |
Description |
|---|---|
This block has no parameters. |
when started
[Change the screen's color after it's pressed.]
wait until <screen pressed?>
set fill color to [green v] on screen
draw rectangle [0] [0] [479] [239] on screen
when started
[Display different messages after the screen is pressed.]
wait until <screen pressed?>
print [First message!] on screen ▶
set cursor to next row on screen
[Lift finger to press the screen again.]
wait until <not <screen pressed?>>
wait until <screen pressed?>
print [Second message!] on screen ▶
screen position#
The screen position reporter block reports the selected coordinate of the last screen press. The x-coordinate is from 0 (left) to 479 (right). The y-coordinate is from 0 (top) to 239 (bottom).
(screen [x v] position)
Parameters |
Description |
|---|---|
axis |
The coordinate of the last screen press to report: x – The horizontal position or y – The vertical position |
when started
[Display a circle where the screen is pressed.]
wait until <screen pressed?>
set fill color to [white v] on screen
draw circle (screen [x v] position) (screen [y v] position) [20] on screen
when screen#
The when screen hat block runs the attached stack of blocks when the Brain screen is pressed or released.
when Brain screen [pressed v] :: hat events
Parameters |
Description |
|---|---|
state |
When to run the attached stack of blocks: pressed runs when the screen is pressed, and released runs when the screen is released. |
when Brain screen [pressed v] :: hat events
[Color the screen with polka dots by pressing it repeatedly.]
set fill color to [red v] on screen
draw circle (screen [x v] position) (screen [y v] position) [20] on screen









