DEVICES WIZARD · PATH A · PER-PROJECT CHECKLIST

Devices Wizard Setup per project

Spartan curriculum is Path A: hardware configured in VEXcode V5's Devices wizard, code references the wizard-generated names. This page is the per-project checklist of what to add, in what order, with what exact name.

Why this page exists: reference project code (Clawbot single, sensor-loaded, etc.) expects specific device names like LeftDriveSmart, DrivetrainInertial, Arm, Claw. If you name a device differently in the wizard, you get build errors. This page is the ground truth for what to add for each reference project.

The universal workflow

For any reference project, the order of operations is:

  1. Create: File → New Text Project → C++ → Empty Project → save
  2. Configure devices in the wizard (this page tells you which ones, in what order, with what names)
  3. Paste the reference code into main.cpp (Select All → Delete → Paste → Save)
  4. Build (Ctrl+F5 / Cmd+B). If you get "X not declared" errors, go back to step 2 and check the device name spelling.
  5. Download to the brain. Calibrate and test.
Add devices in this order: Controller → Drivetrain → individual motors → smart-port sensors → 3-wire sensors. Adding the Drivetrain before individual motors means the wizard reserves the drive ports first, preventing conflicts.

Reference: how to add each device type

(High-level — see the Guide Part 2 for full step-by-step with VEX KB citations.)

Device typeWizard stepsWhat it produces
Controller Add Device → Controller → Done controller Controller1 = controller(primary);
Drivetrain 2-Motor Add Device → Drivetrain 2-Motor → assign Left port, Right port, Inertial port → set wheel size, track width, cartridge → Done LeftDriveSmart, RightDriveSmart, DrivetrainInertial, Drivetrain (smartdrive)
Drivetrain 4-Motor Same as 2-Motor but pick 2 ports per side. Wizard creates motor_groups. LeftDriveSmart1, LeftDriveSmart2, motor_group LeftDriveSmart, same for right, plus DrivetrainInertial and Drivetrain
Individual motor Add Device → Motor → port → RENAME from "Motor1" to your name (e.g., Arm, Claw) → cartridge → reversed flag → Done motor Arm = motor(PORT8, ratio36_1, false);
3-Wire device Add Device → 3-Wire Devices → pick type (Limit Switch / Bumper / Potentiometer / etc.) → 3-wire port (A-H) → RENAME → Done limit ArmTop = limit(Brain.ThreeWirePort.A);
Smart-port sensor Add Device → pick type (Distance / Optical / Vision / etc.) → smart port → RENAME → Done distance BackDist = distance(PORT5);
AI Vision Sensor Add Device → AI Vision Sensor → port → connect USB-C to computer → train colors/AprilTags via live preview → Done aivision AIVision1 = aivision(PORT7, aivision::ALL_AIOBJS, aivision::ALL_TAGS);

Per-project device checklists

Clawbot Single — clawbot-vexcode-single.zip
BASIC · 2-motor drive + Arm + Claw · 5 devices
#DeviceTypePortSettings
1Controller1Controllerprimary
2Drivetrain (group)Drivetrain 2-Motorsee motors below
2a   LeftDriveSmart(in Drivetrain)1ratio18_1 · reversed=true
2b   RightDriveSmart(in Drivetrain)10ratio18_1 · reversed=false
2c   DrivetrainInertial(in Drivetrain)11wheel size 4 in · track ~11.5 in
3ArmMotor8ratio36_1 · reversed=false
4ClawMotor3ratio36_1 · reversed=true
Clawbot Sensor-Loaded — clawbot-sensor-loaded.zip
FULL · 2-motor drive + Arm + Claw + 6 sensors · 9 devices · for AI Vision projects: add AIVision1
#DeviceTypePortSettings
1Controller1Controllerprimary
2DrivetrainDrivetrain 2-Motor(see below)
2a   LeftDriveSmart(in Drivetrain)1ratio18_1 · reversed=true
2b   RightDriveSmart(in Drivetrain)10ratio18_1 · reversed=false
2c   DrivetrainInertial(in Drivetrain)11wheel size 4 in · track ~11.5 in
3ArmMotor8ratio36_1 · reversed=false
4ClawMotor3ratio36_1 · reversed=true
5BackDistDistance Sensor5
6ClawOpticalOptical Sensor4
7ArmTopLimit Switch (3-wire)A
8ArmBotLimit Switch (3-wire)B
9ArmPotPotentiometer (3-wire)C
10FrontBumperBumper Switch (3-wire)D
(opt)AIVision1AI Vision Sensor7Enable AprilTags during setup
Pre-configured shortcut: Download Clawbot_2822_SmartDrive.v5cpp and open it directly via File → Open Project. All 9 devices come pre-configured, you skip the wizard entirely. Use this if you want to jump straight to calibration.
4 devices · 2-motor drive + Lift + Claw
#DeviceTypePortSettings
1Controller1Controllerprimary
2aLeftDriveSmart(in Drivetrain)6ratio18_1 · reversed=true
2bRightDriveSmart(in Drivetrain)4ratio18_1 · reversed=false
2cDrivetrainInertial(in Drivetrain)13
3LiftMotor17ratio18_1 · reversed=false
4ClawMotor15ratio18_1 · reversed=false
COMPETITION BOT · 4-motor blue drive + 2-motor Lift + Intake
#DeviceTypePortSettings
1Controller1Controllerprimary
2Drivetrain (group)Drivetrain 4-Motorblue cartridge (600 RPM)
2a   LeftDriveSmart1(in Drivetrain)1ratio6_1 · reversed=true
2b   LeftDriveSmart2(in Drivetrain)2ratio6_1 · reversed=true
2c   RightDriveSmart1(in Drivetrain)9ratio6_1 · reversed=false
2d   RightDriveSmart2(in Drivetrain)10ratio6_1 · reversed=false
2e   DrivetrainInertial(in Drivetrain)8
3LiftLeftMotor11ratio18_1 · reversed=false
4LiftRightMotor20ratio18_1 · reversed=true
5IntakeMotor4ratio18_1 · reversed=true
Kite — minimal · standard · full
TEAM 2822A COMPETITION BOT · 4-motor blue drive (36:48) · rotation-sensor arm with presets · full sensor suite

Three variants share the same Devices wizard config — pick the one matching your build stage:

#DeviceTypePortSettings
1Controller1Controllerprimary
2Drivetrain (group)Drivetrain 4-Motorblue cartridge (600 RPM)
2a   LeftDriveSmart1(in Drivetrain)1ratio6_1 · reversed=true
2b   LeftDriveSmart2(in Drivetrain)2ratio6_1 · reversed=true
2c   RightDriveSmart1(in Drivetrain)9ratio6_1 · reversed=false
2d   RightDriveSmart2(in Drivetrain)10ratio6_1 · reversed=false
2e   DrivetrainInertial(in Drivetrain)11wheel 3.25 in · gear ratio 1.333 (48T÷36T)
3ArmMotor8ratio36_1 · reversed=false
4ClawMotor3ratio36_1 · reversed=true
5ArmRotationRotation Sensor7mounted on driven gear (HS shaft)
6TrackingFwdRotation Sensor12on 2.75" omni tracking wheel · forward/back odometry · (Full edition only)
7BackDistDistance Sensor5
8ClawOpticalOptical Sensor4
9ArmTopLimit Switch (3-Wire)A
10ArmBotLimit Switch (3-Wire)B
11FrontBumperBumper Switch (3-Wire)D
(opt)AIVision1AI Vision Sensor6Enable AprilTags + color signatures
The Rotation Sensor is the key new piece on Kite. It mounts directly on the arm's driven gear (the HS shaft), giving accurate absolute angle measurements. The arm presets (X/Y/A buttons → ground/mid/high) use this sensor for closed-loop position control. Code reads ArmRotation.position(degrees) — same API as a motor's encoder, but immune to backlash because it's downstream of all the gearing.
Kite's speed — about 76 in/sec top speed. Blue cartridges (600 RPM) × 36:48 reduction (×0.75) = 450 RPM at the wheel. 3.25" wheels × π × 450 ≈ 76 in/sec ≈ 6.4 ft/sec. That's about 1.5× Clawbot. PID drive defaults in the reference code start at 50% velocity (instead of 70%) — tune upward only after the bot drives straight and stops cleanly.
Tracking wheel odometry (Full edition only): TrackingFwd is a Rotation Sensor on a passive 2.75" omni mounted at the chassis centerline, oriented forward/back. Combined with IMU heading, it gives the robot a live (x, y, heading) pose. Two new autons demonstrate it: Odom Waypoint drives to coordinates (48,0)→(48,24)→(0,0); Odom Box traces a 24" square using waypoint navigation. The dashboard shows the live pose on the right side of the screen.

Calibration (do once): place the robot at a known spot, push it exactly 24" forward by hand, read x from the dashboard. If x ≠ 24, adjust TRACKING_WHEEL_INCHES_PER_DEG in Section 7 by the ratio. If x goes negative when you push forward, set reversed=true on the TrackingFwd sensor in the Devices wizard.

What this handles: forward/back motion, pivots, curves. What it doesn't: sideways pushes from defenders (until a strafe wheel is added — same pattern, second Rotation Sensor perpendicular to the first).

Kite-specific build progression

  1. Start with Minimal — configure just the 5 motors + IMU in the wizard. Build. Confirm all 4 drive motors spin and IMU calibrates. Run the drive test auton.
  2. Move to Standard — add all the sensors to the wizard. Re-paste the Standard reference. Build. Calibrate arm presets (read pot values via dashboard, update ARM_GROUND_DEG, ARM_MID_DEG, ARM_HIGH_DEG).
  3. Move to Full — re-paste Full reference (everything stays the same in the wizard). Test the sensor-driven mission auton.

Troubleshooting Path A errors

ErrorWhat it meansFix
'Arm' was not declared (or any device name) The Devices wizard doesn't have a device with that exact name Open Devices panel → verify the name spelling exactly matches the pragma region's expected names. Capitalization matters: ArmarmARM.
redefinition of 'Arm' Both the wizard AND the code declare the same device You probably pasted old Path B code into a Path A wizard-configured project. Delete any motor Arm = motor(...)-style lines from the bottom of main.cpp; let the wizard be the only declaration source.
Devices panel won't open / "Add a Device" button missing You may have deleted the pragma region from main.cpp Re-paste the reference code (which includes the pragma block at the top). The Devices wizard needs those markers to know where to inject device declarations.
Motors spin wrong direction The "reversed" flag is wrong for that motor Open the device in the Devices panel → toggle the Reversed checkbox → Done. No code change needed.
IMU calibration hangs forever The wizard's Inertial port doesn't match your wiring, OR the IMU isn't physically plugged in Open Devices panel → click DrivetrainInertial → verify port matches the cable. Physical check: confirm the IMU module is connected to the brain.
AI Vision Sensor: no color signatures visible Sensor not connected to computer via USB-C Color training uses the live camera feed, which requires direct USB-C from sensor to your computer (not via the brain). After training, you can disconnect USB-C and just use the smart cable.

This site is an informational reference. RECF EN4 prohibits AI-generated content in engineering notebooks and programming code. Rewrite everything in your own words.