Skip to main content

Stage 3: Mecanum Drivetrain

The shared project adds Drivetrain.java. Keep raw drive hardware inside that class and let CompetitionTeleOp.java pass it one gamepad's inputs.

Your Task

Build normalized mecanum drive:

  1. Map "leftFront", "leftBack", "rightFront", and "rightBack" during init().
  2. Accept forward, strafe, and turn inputs and apply the configured deadzone.
  3. Calculate front-left, front-right, back-left, and back-right mecanum values.
  4. Normalize all four values together before calling setPower().
  5. Call drivetrain.drive() from CompetitionTeleOp.loop() with gamepad1 stick axes.

The controls should remain predictable when several inputs are active at once.

Coding Challenge Simulator

Telemark Unit 4 Comprehensive Coding Challenge
The editor opens your saved cumulative DECODE project and adds only the files introduced by this stage.
Use Init and Start to check every unit objective. Passing every check demonstrates full unit mastery.
Complete the stage across its file tabs. The requirement panel checks the compiled project, and a passing stage saves a read-only snapshot.

Passed every challenge check?

Mark the unit mastered to record every lesson objective and continue directly to the next unit. Your progress will be saved in this browser.

Stuck on this lesson?

Ask about anything on this page. It can see which lesson you have open and which part you are reading.