区块#

本指南详细介绍了如何使用 VEXcode VR 中的“块”。您将学习如何阅读和理解每个块,并了解其详尽的描述、参数和使用示例。

理解区块条目#

API 参考中的每个块条目都包含以下组件:

  • 块名称和图像:这是块的名称和块的图像。

  • 描述:对该块功能的简要说明。

  • 参数:屏幕截图显示了该块的所有可用参数以及扩展的下拉菜单。

  • 示例:提供一个图像,演示如何在 VEXcode 中使用该块。

块条目示例#

drive#

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.

aria-description goes here#
驱动 [向前 v]

Parameters

Description

direction

The direction the robot drives:

  • forward
  • reverse

Example

aria-description goes here#
当开始 :: hat events
[Drive forward, then stop.]
驱动 [向前 v]
等待 (2) 秒
驱动停止