0 / 8 页已完成

环境搭建:VEXcode V5Setup: VEXcode V5

VEXcode V5 是 VEX 官方开发环境,安装简单,适合初学者。VEXcode V5 is the official VEX development environment. It's easy to install and great for beginners.

第一步:下载安装Step 1: Download & Install

  1. 打开 VEXcode V5 下载页面Go to the VEXcode V5 download page
  2. 选择你的操作系统(Windows / macOS / Chromebook)Choose your operating system (Windows / macOS / Chromebook)
  3. 下载并安装Download and install

第二步:创建项目Step 2: Create a Project

  1. 打开 VEXcode V5Open VEXcode V5
  2. 点击左上角 File → New ProjectClick File → New Project in the top-left corner
  3. 选择 C++ 模板Select the C++ template
  4. 给项目起个名字(比如 "my-first-project")Give your project a name (e.g. "my-first-project")
项目里有什么?What's in the project?

新项目会自动生成 main.cpp 文件,里面有一个空的 main() 函数 — 这就是你程序的起点。A new project automatically creates a main.cpp file with an empty main() function — this is where your program starts.

第三步:连接机器人Step 3: Connect the Robot

  1. 用 USB 线连接电脑和 VEX BrainConnect your computer to the VEX Brain with a USB cable
  2. VEXcode 右上角会显示 "Connected"VEXcode will show "Connected" in the top-right corner
  3. 点击 Download 按钮,程序就会下载到机器人上Click the Download button to upload your program to the robot
没有机器人?Don't have a robot?

没关系!VEXcode 自带模拟器,你可以先在电脑上运行程序看效果。前几课不需要真机器人。No worries! VEXcode has a built-in simulator so you can run your program on your computer first. You don't need a real robot for the first few lessons.

第四步:试一下Step 4: Try It Out

main() 里写一行代码:Write a line of code inside main():

C++ (VEXcode)
int main() {
    Brain.Screen.print("Hello VEX!");
    return 0;
}

点击 Download → 看 Brain 屏幕上是否显示 "Hello VEX!"Click Download → Check if the Brain screen shows "Hello VEX!"

检查点Checkpoint
VEXcode V5 新项目的入口函数叫什么?What is the entry function of a new VEXcode V5 project?