Blocks#
This guide provides detailed information on how to use the Blocks in VEXcode VR. Here, you will learn how to read and understand each block, with comprehensive descriptions, parameters, and usage examples.
Understanding the Block Entries#
Each block entry in the API Reference includes the following components:
Block Name and Image: This is the name of the block and an image of the block.
Description: A brief explanation of what the block does.
Parameters: Screenshots showing all the available parameters for that block with expanded drop-downs.
Example: Provides an image demonstrating how to use the block in VEXcode.
Example Block Entry#
The drive block moves the drivetrain forward or in reverse using the current drive velocity. This block runs continuously until another Drivetrain block interrupts it or the project stops.
drive [forward v]
Parameters |
Description |
|---|---|
direction |
The direction the robot drives:
|
Example
when started :: hat events
[Drive forward, then stop.]
drive [forward v]
wait (2) seconds
stop driving
Blocks in Subsections#
Some blocks are found in specific subsections that pertain to their particular sensor or functionality. For example, blocks related to timers, sensors, or motors will be grouped accordingly. Refer to these subsections for detailed information on those blocks.