WestlakeLEARN
FTC / Java

First Tech Challenge

FTC / Java

01 · Java for FTC
  • OpMode Anatomy and Hello Robot
  • Variables, Math, and Decisions
  • Methods, Classes, and Robot Helpers
02 · FTC Hardware Essentials
  • Hardware Map and RobotHardware
  • Motors, Servos, and Sensors
  • IMU, Encoders, and Bulk Caching
03 · TeleOp and Mecanum3/3
  • Robot-Centric Mecanum Drive
  • Field-Centric Driving
  • Driver Ergonomics and Safe TeleOp
04 · Subsystems and Commands
  • Subsystem Lifecycle
  • Enums and Finite State Machines
  • Command-Based OpModes
05 · From Timed Steps to Actions
  • Timed and Encoder Autonomous
  • Autonomous State Machines
  • Actions and Sequencing
06 · PID and Feedforward
  • PID Basics
  • Feedforward and PIDF
  • Dashboard Tuning Workflow
07 · Motion Profiling
  • Motion Profile Concepts
  • Implementing a Profiled Mechanism
  • Testing Profiles and Failure Modes
08 · OpenCV and AprilTags
  • VisionPortal Camera Setup
  • OpenCV Color and Region Processors
  • AprilTags and Field Pose
09 · Setup and Tuning
  • Road Runner 1.0 Install and Drive Class
  • Feedforward Tuning
  • Localization and Validation
10 · Trajectories, Actions, and MeepMeep
  • Action Builder and Trajectories
  • MeepMeep Preview
  • Full Road Runner Autonomous
11 · Git, Debugging, and Competition Readiness
  • Git Workflow for FTC Teams
  • Telemetry-First Debugging
  • Competition Readiness Checklist
12 · Driver Control
  • Driver Control
13 · Autonomous Build
  • Simple Autonomous
14 · Debugging
  • Debugging with Telemetry

03 / TeleOp and Mecanum

Driver Ergonomics and Safe TeleOp

Design controls that are predictable, recoverable, and competition-ready.

55 minIntermediateTeleOp and Mecanum

You will

  1. 01Use edge detection for button presses.
  2. 02Create slow modes and safe mechanism positions.
  3. 03Add readable loop-rate and state telemetry.

Why Driver Ergonomics and Safe TeleOp matters

This lesson is about the interface between drivers and robot behavior. Good TeleOp code is not just mathematically correct; it is predictable under pressure, easy to recover, and readable enough that the drive team can describe what the robot is supposed to do.

Starting point

Buttons need memory

A button held for half a second may be seen by dozens of loops. Edge detection compares current and previous gamepad states so one press schedules one action.

Safe TeleOp has recovery paths

Competition code should include reset buttons, safe states, and telemetry for the driver coach. When something unexpected happens, the team needs a known way back.

Build path

Test driver code in movement primitives and mechanism primitives instead of full-match chaos. Add deadbands, slow modes, edge detection, and safe states only after students can explain the raw input and final output for each control.

For this specific lesson, students should first restate the goal in robot terms, then identify the value or behavior they expect to observe, then run the smallest test that proves the idea. The lesson should feel like a guided lab: predict, run, observe, explain, and only then extend.

ButtonEdgeDetection.java · Java

Gamepad current = new Gamepad();
Gamepad previous = new Gamepad();

previous.copy(current);
current.copy(gamepad2);

if (current.a && !previous.a) {
    robot.arm.goToPickup();
}

if (current.touchpad_finger_1 && !previous.touchpad_finger_1) {
    robot.goToSafeState();
}

Debugging and failure modes

When TeleOp feels wrong, translate driver feedback into small tests: forward, strafe, rotate, precision mode, button press, held button, and safe recovery. Print raw inputs and final commands so the team can separate driver feel from wiring, math, and mechanism bugs.

Practice

Choose three mechanism controls and convert them from level-triggered logic to edge-triggered logic. Add one safe-state button.

Checks

  • Holding a button does not repeatedly restart the same command.
  • The safe-state control works from every tested mechanism position.
  • Telemetry shows current driver mode or mechanism state.

Check your understanding

Module check

Why compare current and previous gamepad states?

0 of 1 answered

References

FIRST FTC DocsOfficial FTC SDK and robot programming documentation.Game Manual 0Community FTC programming, control, and robot design reference.

Finished reading?

Mark this lesson complete.

You'll move on to “Subsystem Lifecycle” next.

Field-Centric DrivingSubsystem Lifecycle