在 VEXcode Pro V5 中建立左右轉項目

The VEX Visual Studio Code Extension has replaced VEXcode Pro V5, which is now end-of-life.

VEXcode Blocks and VEXcode Text remain actively developed and supported for all VEX platforms.

此範例程式展示如何使用 VEXcode Pro Text 對 V5 Clawbot 進行左轉和右轉編程。

怎麼運作的

程式使用 (degs,units) 指令將機器人轉動指定的角度。 可以使用數值指定度數。

您可以使用 指定單位。 正數值可用於將機器人向左轉,正數值可用於將機器人向右移動。

程序中執行的步驟:

  1. 傳動系統設定為向左轉 90 度。
  2. 程式將等待 1 秒後再執行下一行程式碼。
  3. 傳動系統設定為使機器人向相反方向轉動,即向右旋轉 180 度。

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: