区块#
This guide provides detailed information on how to use Blocks in VEXcode V5. Here, you will learn how to read and understand each block, with comprehensive descriptions, parameters, and usage examples.
理解区块条目#
API 参考中的每个块条目都包含以下组件:
块名称和图像:这是块的名称和块的图像。
描述:对该块功能的简要说明。
参数:屏幕截图显示了该块的所有可用参数以及扩展的下拉菜单。
示例:提供一个图像,演示如何在 VEXcode 中使用该块。
块条目示例#
turn for#
The turn for block turns the drivetrain left or right for a specific number of degrees using the current turn velocity.
[右 v] 转 [90] 度 ▶
Parameters |
Description |
|---|---|
direction |
The direction in which the robot turns:
|
angle |
The number of degrees the robot turns, as an integer or decimal. |
expanding arrow |
By default, this is a waiting block, so the drivetrain will finish turning before running the next block. To make the drivetrain start turning and immediately run the next block right away, expand the block to say and don’t wait. |
Example
当开始
[Turn left, then turn around to the right.]
[左 v] 转 [90] 度 ▶
[右 v] 转 [180] 度 ▶
Blocks in Subpages#
Some blocks are located on dedicated subpages linked from the main page. Each subpage focuses on a specific group of devices or functions—for example, the Motion subpage contains all motor-related blocks, while the Logic subpage includes logic-related ones.