Welcome to Code FTC
Interactive lessons that teach you FTC robot programming in Java — from your first OpMode to advanced control theory. Write code, run it, and see results instantly.
Interactive Lessons
Read explanations on the left, write code on the right. Learn by doing.
Real Java Code
Write actual FTC SDK code that compiles and runs against the real API.
Instant Feedback
Automated tests verify your code and tell you exactly what to fix.
Control Theory
Go beyond basics — learn PID, feedforward, and motion profiling.
How It Works
Each lesson has two panels side by side:
- Left panel — Lesson content explaining the concept with examples
- Right panel — A code editor with starter code and a Run button
Write your solution in the editor, click Run, and your Java code is compiled and tested on a real JDK. You'll see green checkmarks for passing tests and helpful error messages when something needs fixing.
Curriculum
Getting Started
Learn the fundamentals of FTC programming with OpModes and hardware.
TeleOp Control
Control motors and servos with gamepad input during TeleOp.
Intro to Control Theory
Learn PID control and other techniques to make your robot move precisely.
Sensors
Read and respond to sensor data — touch, distance, and IMU.
Encoders & Autonomous
Use encoders for precise movement and build autonomous routines.
State Machines
Organize complex robot behavior with finite state machines.
Autonomous Patterns
Non-blocking timing, encoder-driven movement, and IMU-guided turning for reliable autonomous routines.
Advanced Motor Control
BRAKE vs FLOAT zero-power behavior, DcMotorEx velocity control, and continuous rotation servos.
Iterative OpMode
The OpMode base class, its init/loop lifecycle, and how to write non-blocking control patterns.
Advanced Control
Gravity compensation for arm mechanisms and trapezoidal motion profiling for smooth autonomous movement.
Field-Centric Drive
Rotate gamepad inputs by the robot's IMU heading to drive relative to the field, not the robot.
Built for the FTC community.