Search lessons

Suggested searches

Browse

FRC robot programming

Start here after you can write a Java class, call methods, use an interface, and explain a loop. The goal is to turn driver requests into predictable robot behavior, then use measurements and tests to explain that behavior.

Start with one working mechanism

  1. Set up the programming tools.
  2. Read command-based programming and architecture.
  3. Build the first simulated subsystem. Run its tests before adapting it to hardware.
  4. Explore sensors, closed-loop control, and autonomous.

The included starter pins Java 17 and WPILib 2026.2.1 so the examples have a reproducible environment. Season-specific vendor APIs and older team code have different requirements. Follow each lesson's version notes instead of mixing snippets from different years.

Separate behavior from devices

Once one subsystem works, learn how teams keep the same behavior while changing its source of measurements and outputs:

These IO names describe a design pattern, not a required WPILib superclass. The lessons distinguish ordinary Java/WPILib examples from AdvantageKit-specific APIs.

Read actual team code

The 2026 robot walkthrough traces interfaces, subsystem periodic updates, logging and simulation in a pinned Team 1257 revision. Compare it with the 2025 walkthrough and investigate a real 2024 log. Code shows what was implemented; it does not establish that a mechanism performed successfully at an event.

Use documentation while you program

WPILib provides robot program structure, device interfaces, control math, simulation and testing support. Vendor libraries add device-specific APIs. The WPILib Java reference gives exact method signatures.

Runnable examples include their imports and dependencies. Your editor can suggest imports, but check the package and API version: two classes with similar names can have different behavior. A compile error is useful evidence about the example's contract, rather than something to hide with a different import.

Use the debugging playbooks when observed behavior differs from your prediction, and use the mentor guide to review an exercise with someone else.

Connect measurements to decisions

Read state estimation to distinguish raw measurements, drift, bias and a calculated robot state. Follow it with control-loop design: a goal becomes a profile, feedforward and feedback produce an output, and the mechanism returns a new measurement. The vision sequence follows camera pixels through geometry, pose estimation and a controlled approach. Each lesson includes worked examples and questions, with simplified labs where useful.