Code the robot with WPILib — plus sensors, vision & control.
The Programming & Software branch is where robot hardware comes to life. FRC programmers use WPILib (the official robotics library) to read sensors and controllers, drive motors, run autonomous routines, and tune precise closed-loop control. This guide takes a motivated beginner from installing the toolchain to writing a clean command-based robot with PID/feedforward control, trajectory following, odometry, and simulation. Every API, part name, and tool is verified against current WPILib, CTRE Phoenix 6, and REVLib 2025/2026 documentation so you learn what teams actually ship today.
0 / 51 lessons
Reading is free — no login needed. Sign in to light up this ring as you master the department.
The learning path
A beginner-friendly primer that builds the core programming and Java fundamentals every newcomer needs before writing a single line of FRC robot code. Start from absolute zero with variables, control flow, and objects, then learn why FRC robots are programmed in Java and how to read the WPILib library you'll lean on all season. Complete this before diving into the department's main robot-code lessons.
Module overview: Programming Foundations: A Java PrimerSet up the full FRC software toolchain and understand the big picture. You will install WPILib and the Game Tools, learn which languages FRC supports, and write and deploy your first robot program to a roboRIO.
Module overview: Foundations: Tools, Languages, and Your First Robot ProgramLearn how a robot program is structured and runs. Start with TimedRobot's lifecycle, then adopt the command-based framework — the modern, recommended way to organize FRC code with Subsystems, Commands, and Triggers.
Module overview: The Robot Program: Lifecycle and Command-Based ArchitectureDrive real hardware with vendor motor-controller APIs (CTRE Phoenix 6 and REVLib 2025), then make mechanisms precise with PID feedback, feedforward, and motion profiles.
Module overview: Motors, Sensors, and Closed-Loop ControlMake the robot navigate the field on its own. Track position with odometry, generate and follow paths with PathPlanner and Choreo, build full autonomous routines, and test everything in simulation before touching hardware.
Module overview: Autonomous: Odometry, Trajectories, and SimulationBefore control, comes sensing. This module covers the three ways sensors talk to a roboRIO and the simple but essential sensors built on them: limit switches, beam breaks, distance sensors, and current sensing.
Module overview: Sensing Fundamentals: Digital, Analog, and CAN InputsEncoders are the most important sensors for feedback control. This module covers how quadrature, absolute, and integrated encoders work and the specific products you will use.
Module overview: Encoders: Measuring Position and VelocityTo know which way it is pointing and to keep its driving straight, a robot needs a gyroscope. This module covers IMUs, drift, calibration and mounting, the field coordinate system, and odometry.
Module overview: Gyros, IMUs, and OrientationSensors are only useful if the robot acts on them. This module teaches the math and methodology of feedback control: PID tuning, feedforward, and characterizing your mechanism with SysId.
Module overview: Closed-Loop Control: PID, Feedforward, and SysIdThe most advanced sensing in FRC: cameras that find AprilTags to compute where the robot is, and fusing that with odometry for accurate, drift-free localization.
Module overview: Computer Vision and Pose EstimationNine separate modules taught you the pieces. This one bolts them together into complete, buildable projects. Each lesson is an end-to-end mini-project you can type out, deploy, and run -- a closed-loop elevator with Motion Magic, a REVLib velocity-controlled shooter, a teleop swerve drive subsystem, a PathPlanner autonomous routine, and a vision-aligned scoring sequence. Every snippet uses real vendor APIs (CTRE Phoenix 6, REVLib 2025, WPILib command-based, PathPlanner, Limelight) and real part numbers so the code compiles against the libraries your team actually installs.
Module overview: Worked Examples and Mini-ProjectsMost lost matches trace to a handful of recurring software faults: a default command that throws because it forgot its requirement, a loop overrun from chatty logging or CAN queries, a brown-out that silently kills your outputs, a CAN ID conflict, or a control loop with integral windup. This module is a field guide to those failure modes -- how to recognize each one fast, the exact tools to diagnose it (Driver Station log viewer, AdvantageScope, Glass, the scheduler watchdog), and the concrete fix. Treat it as the debugging playbook you reach for when the robot misbehaves at 11pm before a competition.
Module overview: Common Mistakes and TroubleshootingOnce the fundamentals are solid, top teams reach for techniques that squeeze out reliability and precision: model-based state-space control with Kalman filtering, log-replay architectures like AdvantageKit that let you debug a match offline, advanced multi-tag pose fusion, robot-to-robot coordination, and rigorous pre-event software hardening. This module goes deep on those advanced controls and software-engineering practices, with real WPILib/vendor APIs and concrete case studies, so an experienced programmer can level up from 'it works' to 'it works every match, and we can prove why.'
Module overview: Advanced Techniques and Case Studies13 modules, 51 lessons, all free — grounded in the real Game Manual and WPILib docs. Read now, track your mastery when you sign up.