区块#
本指南提供有关如何使用 VEXcode 123 中的块的详细信息。在这里,您将学习如何阅读和理解每个块,包括全面的描述、参数和使用示例。
理解区块条目#
API 参考中的每个块条目都包含以下组件:
块名称和图像:这是块的名称和块的图像。
描述:对该块功能的简要说明。
阻塞/非阻塞:表示该块是否等待完成后再移动到下一个块。
Parameters: Tables showing all the available parameters for that block with expanded drop-downs.
返回:描述块返回的内容(如果适用)。
示例:提供一个图像,演示如何在 VEXcode 中使用该块。
块条目示例#
The drive block moves the robot in the specified direction. This is a non-waiting block, meaning it runs continuously until another Drivetrain block interrupts it or the project stops.
驱动 [向前 v]
Parameters |
Description |
|---|---|
direction |
Drives the robot in one of the following directions:
|
Example
当开始
[Drive for 2 seconds.]
驱动 [向前 v]
等待 (2) 秒
驱动停止
子部分中的块#
某些模块位于与其特定传感器或功能相关的特定子部分中。例如,与计时器、传感器或电机相关的模块将相应地分组。有关这些模块的详细信息,请参阅这些子部分。