Page 76 - Ai Robogenius
P. 76
Blocks Description
Drivetrain - Values
Returns True once the drivetrain has finished its current
drive is done?
motion otherwise, it returns False.
Returns True when the drivetrain is in motion otherwise,
drive is moving?
it returns False.
Displays the drivetrain's current absolute heading
drive heading in degrees
(ranging from 0 to 359.99°).
drive rotation in degrees Displays the total rotation since the program began.
DRAWING BLOCKS
In VEXcode VR, drawing blocks are used to create and control shapes on the virtual playground.
By combining movement and control blocks, you can program the robot to draw lines, shapes and
patterns. These blocks allow for precise control over the robot’s position, enabling creative designs and
graphical representations.
The drawing blocks are given below:
Blocks Description
This block controls the pen's position, usually in relation
move pen down to the robot's movement. The pen can be either up (not
drawing) or down (drawing).
This block sets the pen colour to a selected value, enabling
set pen to color black the robot to draw in that colour. You can choose from
options like black, red, green and blue.
This block also sets the pen's colour, with added functionality
set pen color
to directly adjust the colour value.
This block adjusts the pen's width (thickness), allowing you
set pen to width thin to increase or decrease the thickness of the lines the robot
draws.
This block fills a region or shape that the robot has drawn
fill area with color
with a chosen colour.
DRAWING A RECTANGLE ON THE GRID MAP
In VEXcode VR, you can create various shapes by programming the robot to move forward, backward
and turn at specific angles. To draw a rectangle, follow these steps:
STEP - 1 Click on the SELECT PLAYGROUND button.
AI RoboGenius - VII
74

