Screen#
Introduction#
The Screen category includes blocks that allow your IQ (2nd gen) Brain’s Screen to display text, values, and graphics on the brain’s built-in screen. These blocks can be used to print sensor data, create custom interfaces, or draw visual elements like lines, shapes, and text with adjustable styles and colors.
For drawing, the Brain’s resolution is 160 x 108 pixels.
Below is a list of all blocks:
Print — Display text and values on the Brain.
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 specific row of text.
cursor column — Reports the column number where text will be printed.
cursor row — Reports the row number where text will be printed.
Settings — Configure screen display properties.
clear screen — Clears the entire screen.
set font on screen — Sets the font style and size for printed text.
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 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.
draw circle on screen — Draws a circle.
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.
print [VEXcode] on screen ▶
Parameters |
Description |
|---|---|
value |
The text, number, or variable value to display. |
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 ◀ and set cursor to next row

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.
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 as an whole number. |
column |
The column to move the cursor to as a whole number. |
Example
when started
[Repeatedly print the current timer at Row 1 Column 1]
forever
print (timer in seconds) on screen ◀ and set cursor to next row
wait (1) seconds
clear screen
set cursor to row (1) column (1) 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 ◀ and set cursor to next row

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
[Display text on two rows, but only keep one.]
print [This text stays] on screen ◀ and set cursor to next row
print [This disappears] on screen ◀ and set cursor to next row
wait (3) seconds
clear row (2) on screen
cursor column#
The cursor column reporter block reports the column number where text will be printed as a whole number.
(cursor column)
Parameters |
Description |
|---|---|
This block has no parameters. |
Example
when started
[Display the cursor's current column.]
set cursor to row [3] column [2] on screen
print (cursor column) on screen ▶
cursor row#
The cursor row reporter block reports the row number where text will be printed as a whole number.
(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 (cursor row) on screen ▶
Settings#
clear screen#
The clear screen stack block clears all text and drawings from the Brain screen.
clear screen
Parameters |
Description |
|---|---|
This block has no parameters. |
Example
when started
[Fill the screen, then clear it after 2 seconds.]
repeat (5)
print [Line] on screen ◀ and set cursor to next row
end
wait (3) 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 |
|---|---|
font |
The font to use: monospaced or proportional |
size |
The size to use:
|
|
|
|
|---|---|---|
|
|
|
|
|
|
|
Example
when started
[Display two different fonts on separate lines.]
set font to [monospaced v] [medium v] on screen
print [Mono Medium] on screen ◀ and set cursor to next row
set font to [proportional v] [medium v] on screen
print [Prop Medium] on screen ◀ and set cursor to next row

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] / [3]) on screen ◀ and set cursor to next row

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 two circles with different pen widths.]
draw circle (40) (70) (20) on screen
set pen width to (5) on screen
draw circle (100) (70) (20) 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 two rectangles with different colors.]
draw rectangle (100) (50) (10) (20) on screen
set pen / font color to [blue v] on screen
draw rectangle (50) (50) (10) (20) 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:
|
Example
when started
[Draw a yellow circle.]
set fill color to [yellow v] on screen
draw circle (50) (50) (20) 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 159. |
y |
The y-coordinate to draw the pixel, from 0 to 107. |
Example
when started
[Draw one pixel at the center of the screen.]
draw pixel (80) (50) 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] [159] [107] on screen
Parameters |
Description |
|---|---|
x1 |
The x-coordinate in pixels of the start of the line, from 0 to 159. |
y1 |
The y-coordinate in pixels of the start of the line, from 0 to 107. |
x2 |
The x-coordinate in pixels of the end of the line, from 0 to 159. |
y2 |
The y-coordinate in pixels of the end of the line, from 0 to 107. |
Example
when started
[Draw a line from the top left to bottom right of the screen.]
draw line (0) (0) (159) (107) 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 159. |
y |
The y-coordinate in pixels of the top-left corner of the rectangle, from 0 to 107. |
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 (25) (25) (100) (50) 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 159. |
y |
The y-coordinate in pixels of the center of the circle, from 0 to 107. |
radius |
The radius of the circle in pixels. |
Example
when started
[Draw a circle on the screen.]
draw circle (80) (50) (20) on screen










