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:
- Create:
File → New Text Project → C++ → Empty Project → save - Configure devices in the wizard (this page tells you which ones, in what order, with what names)
- Paste the reference code into
main.cpp(Select All → Delete → Paste → Save) - Build (Ctrl+F5 / Cmd+B). If you get "X not declared" errors, go back to step 2 and check the device name spelling.
- 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 type | Wizard steps | What 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
| # | Device | Type | Port | Settings |
|---|---|---|---|---|
| 1 | Controller1 | Controller | — | primary |
| 2 | Drivetrain (group) | Drivetrain 2-Motor | — | see motors below |
| 2a | LeftDriveSmart | (in Drivetrain) | 1 | ratio18_1 · reversed=true |
| 2b | RightDriveSmart | (in Drivetrain) | 10 | ratio18_1 · reversed=false |
| 2c | DrivetrainInertial | (in Drivetrain) | 11 | wheel size 4 in · track ~11.5 in |
| 3 | Arm | Motor | 8 | ratio36_1 · reversed=false |
| 4 | Claw | Motor | 3 | ratio36_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
| # | Device | Type | Port | Settings |
|---|---|---|---|---|
| 1 | Controller1 | Controller | — | primary |
| 2 | Drivetrain | Drivetrain 2-Motor | — | (see below) |
| 2a | LeftDriveSmart | (in Drivetrain) | 1 | ratio18_1 · reversed=true |
| 2b | RightDriveSmart | (in Drivetrain) | 10 | ratio18_1 · reversed=false |
| 2c | DrivetrainInertial | (in Drivetrain) | 11 | wheel size 4 in · track ~11.5 in |
| 3 | Arm | Motor | 8 | ratio36_1 · reversed=false |
| 4 | Claw | Motor | 3 | ratio36_1 · reversed=true |
| 5 | BackDist | Distance Sensor | 5 | — |
| 6 | ClawOptical | Optical Sensor | 4 | — |
| 7 | ArmTop | Limit Switch (3-wire) | A | — |
| 8 | ArmBot | Limit Switch (3-wire) | B | — |
| 9 | ArmPot | Potentiometer (3-wire) | C | — |
| 10 | FrontBumper | Bumper Switch (3-wire) | D | — |
| (opt) | AIVision1 | AI Vision Sensor | 7 | Enable 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.
Flex — flex-vexcode-single.zip
4 devices · 2-motor drive + Lift + Claw
| # | Device | Type | Port | Settings |
|---|---|---|---|---|
| 1 | Controller1 | Controller | — | primary |
| 2a | LeftDriveSmart | (in Drivetrain) | 6 | ratio18_1 · reversed=true |
| 2b | RightDriveSmart | (in Drivetrain) | 4 | ratio18_1 · reversed=false |
| 2c | DrivetrainInertial | (in Drivetrain) | 13 | — |
| 3 | Lift | Motor | 17 | ratio18_1 · reversed=false |
| 4 | Claw | Motor | 15 | ratio18_1 · reversed=false |
Skimmer — skimmer-vexcode-single.zip
COMPETITION BOT · 4-motor blue drive + 2-motor Lift + Intake
| # | Device | Type | Port | Settings |
|---|---|---|---|---|
| 1 | Controller1 | Controller | — | primary |
| 2 | Drivetrain (group) | Drivetrain 4-Motor | — | blue cartridge (600 RPM) |
| 2a | LeftDriveSmart1 | (in Drivetrain) | 1 | ratio6_1 · reversed=true |
| 2b | LeftDriveSmart2 | (in Drivetrain) | 2 | ratio6_1 · reversed=true |
| 2c | RightDriveSmart1 | (in Drivetrain) | 9 | ratio6_1 · reversed=false |
| 2d | RightDriveSmart2 | (in Drivetrain) | 10 | ratio6_1 · reversed=false |
| 2e | DrivetrainInertial | (in Drivetrain) | 8 | — |
| 3 | LiftLeft | Motor | 11 | ratio18_1 · reversed=false |
| 4 | LiftRight | Motor | 20 | ratio18_1 · reversed=true |
| 5 | Intake | Motor | 4 | ratio18_1 · reversed=true |
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:
- Minimal (~120 lines): driver control + drive-test auton. Just enough to verify the chassis works. Skip the sensors below for this variant.
- Standard (~480 lines): full 9-section architecture, 4 autons, dashboard task, arm presets. All sensors required.
- Full (~530 lines): standard + sensor-driven mission auton (Exercise 6 endpoint). All sensors required.
| # | Device | Type | Port | Settings |
|---|---|---|---|---|
| 1 | Controller1 | Controller | — | primary |
| 2 | Drivetrain (group) | Drivetrain 4-Motor | — | blue cartridge (600 RPM) |
| 2a | LeftDriveSmart1 | (in Drivetrain) | 1 | ratio6_1 · reversed=true |
| 2b | LeftDriveSmart2 | (in Drivetrain) | 2 | ratio6_1 · reversed=true |
| 2c | RightDriveSmart1 | (in Drivetrain) | 9 | ratio6_1 · reversed=false |
| 2d | RightDriveSmart2 | (in Drivetrain) | 10 | ratio6_1 · reversed=false |
| 2e | DrivetrainInertial | (in Drivetrain) | 11 | wheel 3.25 in · gear ratio 1.333 (48T÷36T) |
| 3 | Arm | Motor | 8 | ratio36_1 · reversed=false |
| 4 | Claw | Motor | 3 | ratio36_1 · reversed=true |
| 5 | ArmRotation ⭐ | Rotation Sensor | 7 | mounted on driven gear (HS shaft) |
| 6 | TrackingFwd ⭐ | Rotation Sensor | 12 | on 2.75" omni tracking wheel · forward/back odometry · (Full edition only) |
| 7 | BackDist | Distance Sensor | 5 | — |
| 8 | ClawOptical | Optical Sensor | 4 | — |
| 9 | ArmTop | Limit Switch (3-Wire) | A | — |
| 10 | ArmBot | Limit Switch (3-Wire) | B | — |
| 11 | FrontBumper | Bumper Switch (3-Wire) | D | — |
| (opt) | AIVision1 | AI Vision Sensor | 6 | Enable 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):
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
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).
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
- 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.
- 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). - Move to Full — re-paste Full reference (everything stays the same in the wizard). Test the sensor-driven mission auton.
Troubleshooting Path A errors
| Error | What it means | Fix |
|---|---|---|
'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: Arm ≠ arm ≠ ARM. |
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. |