Robot Config: Three Wire Port - VEXcode V5 Text

Step 1: Open a Project

  • Open a project in VEXcode V5 Text.

Step 2: Modify the main.cpp File

There are two formats to declare a three wire port device, though each format requires a device type, name, port, and motor direction in a line beforeint main(), like in the image described above.

  • The first format shown in the image above a condensed format.
    • The device type will always start with vex::.
    • The device name can be any name that isn’t already used by the programming language.
    • The device port needs to be in parenthesis right after the motor’s name. Assignment for three wire port devices will always start with Brain.ThreeWirePort. and can be assigned any letter A-H.
  • The second format shown in the image above the full format on how to declare a three wire port device.
    • The device type will always be vex::.
    • The device name can be any name not already used by the program.
    • The device port is typed out the same way as the first format, just preceded by = vex::[devicetype].