Screen#

Introduction#

The Screen blocks control how the IQ (1st gen) Brain displays text and values on its built-in screen.

The IQ (1st gen) Brain screen supports up to 5 rows and 21 columns of text.

The VEX IQ (1st gen) Brain with a numbered grid overlay (columns 1–21 and rows 1–5). Red overlay lines highlight the grid structure, with arrows labeling Column 1, Column 21, Row 1, Row 2, and Row 5. The first row displays numbers 1 through 21 across the top.

Below is a list of all blocks:

Cursor Print — Display text and values on the brain.

Settings — Configure screen display properties.

Cursor Print#

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.

The IQ (1st gen) Brain uses a monospaced font, meaning each character has the same width for consistent text alignment. The IQ (1st gen) Brain screen supports up to 5 rows and 21 columns of text.

Set cursor 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 a message in the middle of the screen]
    set cursor to row (3) column (7) on screen
    print [VEXcode!] on screen ▶

The IQ (1st gen) Brain screen displaying centered text reading “VEXcode!”.

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 [First Message] on screen ▶
    set cursor to next row on screen
    print [Second Message] on screen ◀ and set cursor to next row

The IQ (1st gen) Brain screen displaying “First Message” and “Second Message,” displayed on separate lines.

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 as a whole number.

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

Settings#

clear screen#

The clear screen stack block clears all text and drawings from the brain’s 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 print precision on screen#

The set print precision on screen stack block sets how many decimal places are shown when numbers are printed on the Brain screen. This print precision will apply to all numbers printed after this block runs.

    set print precision to [0.1 v] on screen

Parameters

Description

precision

The print precision to use:

  • 1
  • 0.1
  • 0.01
  • 0.001
  • All Digits

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