Build it by hand
These tutorials build robot programs by hand, with the library’s building blocks, one idea at a time. They show how a robot program works inside: what a PID is, what a bulk read is, why software limits do not replace hard stops. They are optional. The docs sections, from Set up to Tests, are enough to build and run a robot with the five files.
Do them when you want to know how the parts work inside, or when you need a part that has no five-files module. Each tutorial has a complete program you can copy into TeamCode and run. A test builds and checks those programs every time the library changes.
The module pages are the reference: every class, every method. The tutorials give the “how and why”: what to write, in what order, and what to check on the robot.
Used Scratch or Blocks before: read From Blocks to Java first.
The tutorials
Section titled “The tutorials”| # | Tutorial | You learn | Robot needed |
|---|---|---|---|
| 01 | OpMode basics with the library | the shape of every program, imports, fields, lambdas, try/finally (Java basics) |
Control Hub + gamepad only |
| 02 | Motors and servos | MotorSetup, ServoSetup, Hw, encoders, servo ranges |
1 motor, 1 servo |
| 03 | Buttons | ControllerBindings: every kind of binding, toggles with rumble, triggers |
gamepad only |
| 04 | Drive a mecanum robot | MecanumDrive, stick shaping, slow mode, field-centric, reverse |
mecanum chassis |
| 05 | Drive a standard (tank) robot | TankDrive, arcade vs tank style, 2 or 4 motors |
standard chassis |
| 06 | A fast, clear loop | bulk reads, LoopTimer, telemetry layout |
any drivetrain |
| 07 | PID: hold a lift at a height | what P, I, D and F do; PidController; live tuning |
a lift with an encoder |
| 08 | A lift that cannot hurt itself | SafeMotor: soft limits, homing, slow zone; why hard stops still matter |
a lift (+ bottom switch) |
| 09 | Autonomous by hand with AutoDrive | AutoDrive, tuning distance and turns |
any drivetrain |
| 10 | Autonomous with mechanisms | loop hook, results, INIT choices, mirroring, pose handoff, by hand | drivetrain + lift |
| 11 | Driver assists | heading snap with PID, AimRumble, SlewRateLimiter |
mecanum + IMU |
| 12 | Organize a whole robot | Robot and subsystem classes by hand (what five files does for you) |
drivetrain, lift, claw |
| 13 | Test your code without a robot | JUnit tests for team code, run on a laptop | none |
| 14 | Mechanism helpers | PositionMotor, SpinMotor, PositionServo, SpinServo, Subsystems: what the modules are made of |
lift, servo, intake |
| 15 | Telemetry, profiles and tuning | driver vs debug telemetry, practice/competition, live tuning, match timer | a lift |
| 16 | Easy autonomous | EasyAuto, the layer under the five-files autonomous |
tuned drivetrain + lift + claw |
| 17 | Launcher | flywheel, hood, feeder, shot table, by hand | a shooter |
| 18 | Vision aiming | webcam, Limelight 3A or HuskyLens through one interface, safe aiming | camera + drivetrain |
| 19 | Check the hardware | the Hardware Check and a testing order | any robot |
| 20 | Easy TeleOp | EasyTeleOp, the layer under Controls.java (also used by the starter kit) |
drivetrain + lift + claw |
| 21 | Find your numbers | the finders: servo ends, lift limits, flywheel gains, wheel size, camera offset, shot table | the parts to measure |
Tutorials 07, 09 and 12 take longer than the others, because tuning takes time. New to Java: do 01
first. It explains imports, fields and lambdas (() -> ...), and every lesson uses them.
Before you start
Section titled “Before you start”- The library is in your robot project: Add the library.
- Read Signs and units once. It saves you hours of fixing a robot that turns the wrong way.
- The robot configuration on the Driver Station is the list of devices and their names. Make it match the names in the tutorial, or change the names in the code. Each tutorial lists the names it uses.
How to use a tutorial program
Section titled “How to use a tutorial program”The programs are in the library at
examples/.../examples/tutorials/.
- Copy the file into
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/. - The
packageline must match the folder the file is in. So change the first line topackage org.firstinspires.ftc.teamcode;. Tutorial 12’s files go in a folderrobotthere, withpackage org.firstinspires.ftc.teamcode.robot;. They also needRobotSettings. - Delete the
@Disabledline, so the program shows on the Driver Station. - Build, then run it from the Driver Station.
Better: type it yourself. Each tutorial builds the program step by step. When you type it, you make mistakes and fix them, and you learn more than from a copy. Use the full file to check your work.
Safety for every tutorial
Section titled “Safety for every tutorial”- Start with low power (
powerLimit = 0.4, or a small multiplier). Raise it after the program works. - Lift the wheels off the ground the first time a drivetrain runs.
- Keep a hand near the Driver Station STOP button.
- For lifts and arms, find the hard stops before you run anything.
Something wrong on this page? Tell us with a short GitHub form.