Module 00 - Hardware & Development Environment
Module Overview
  • Module Overview
Lesson 0.1 - The V5 Brain
  • The Situation
  • The Concept
    • The operating system
    • What's on the front
    • What's around the edges
    • Inside the Brain
  • Look at Your Robot
  • What People Get Wrong
  • Where This Comes Back
Lesson 0.2 - Smart Ports and 3-Wire Ports
  • The Situation
  • The Concept
    • Smart ports
    • Smart port numbering in code
    • 3-wire (ADI) ports
    • Digital vs. analog: the basic distinction
    • The 3-Wire Expander
  • Look at Your Robot
  • What People Get Wrong
  • Where This Comes Back
Lesson 0.3 - V5 Smart Motors
  • The Situation
  • The Concept
    • The two-motor family
    • The motor core
    • The encoder
    • The temperature sensor
    • The current sensor
    • The output gearing
    What "smart" means for the motor
    • Commanding a motor
  • Look at Your Robot
  • What People Get Wrong
  • Where This Comes Back
Lesson 0.4 - Gear Cartridges
  • The Situation
  • The Concept
    • Red cartridge - 100 RPM, 36:1 ratio, max torque
    • Green cartridge - 200 RPM, 18:1 ratio, balanced
    • Blue cartridge - 600 RPM, 6:1 ratio, max speed
    • The bicycle analogy
    • The trade-off you can't escape
    • Why your code needs to know
    • Quick reference
  • Look at Your Robot
  • What People Get Wrong
  • Where This Comes Back
Lesson 0.5 - Gear Ratios (External)
  • The Situation
  • The Concept
    • Reduction (slower, stronger)
    • Overdrive (faster, weaker)
    • Same trade-off as cartridges
    • Combining cartridge ratio with external ratio
    • Compound gear trains
    • Idler gears
    • Why external gearing matters more than cartridge for drivetrains
    • Why your code needs to know
  • Look at Your Robot
  • What People Get Wrong
  • Where This Comes Back
Lesson 0.6 - Encoders and Measurement Units
  • The Situation
  • The Concept
    • What it actually measures
    • Three units of measurement
    • Why ticks vary by cartridge
    • Velocity, not just position
    • Distance from encoder ticks
    • The Rotation Sensor
    • The Optical Shaft Encoder
  • Look at Your Robot
  • What People Get Wrong
  • Where This Comes Back
Lesson 0.7 - The Sensor Landscape
  • The Situation
  • The Concept
    • Smart sensors
    • 3-Wire (ADI) sensors and devices
    • Picking a sensor for a task
  • Look at Your Robot
  • What People Get Wrong
  • Where This Comes Back
Lesson 0.8 - The V5 Controller
  • The Situation
  • The Concept
    • Joysticks
    • Buttons
    • The controller LCD
    • Rumble
    • Wired vs. wireless
    • Joystick drift / deadzone (preview)
  • Look at Your Controller
  • What People Get Wrong
  • Where This Comes Back
Lesson 0.9 - Electricity, Battery, and Brownouts
  • The Situation
  • The Concept
    • Current
    • Power
    • Stalls
    • Brownout
    • Motor temperature protection
    • The V5 Battery
  • Look at Your Robot
  • What People Get Wrong
  • Where This Comes Back
Lesson 0.10 - Pneumatics
  • The Situation
  • The Concept
    • The air tank
    • The solenoid valve
    • The cylinder
    • Single-acting vs. double-acting
    • Why pneumatics over motors?
    • Air budget management
    • What pneumatics aren't
  • Look at Your Robot
  • What People Get Wrong
  • Where This Comes Back
Lesson 0.11 - Your Development Environment
  • The Situation
  • The Concept
    • File paths
    • File extensions you'll see
    • VS Code
    • Python and pip
    • PROS CLI commands you'll use
    • Project structure
    • Connecting your Brain via USB
    • Common troubleshooting checklist
    • Recommended workflow
  • Look at Your Setup
  • What People Get Wrong
  • Where This Comes Back
Lesson 0.12 - The PROS Ecosystem
  • The Situation
  • The Concept
  • Why this curriculum teaches raw PROS first
  • Look at Your PROS Install
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 01 - Your First PROS Project
Module Overview
  • Module Overview
Lesson 1.1 - What is PROS?
  • The Situation
  • The Concept
  • Where This Comes Back
  • What People Get Wrong
Lesson 1.2 - The Three Functions That Matter Right Now
  • The Situation
  • The Concept
    • `void initialize()` - the morning routine
    • `void autonomous()` - the 15-second self-driving period
    • `void opcontrol()` - the driver-control period
    • What about the other functions?
  • The lifecycle in one picture
  • Where This Comes Back
  • What People Get Wrong
Lesson 1.3 - Creating, Building, and Uploading
  • The Situation
  • Where This Goes In Your Project
  • The Concept
  • The Code
    • Open the project in VS Code
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 1.4 - Making a Motor Spin
  • The Situation
  • Where This Goes In Your Project
  • The Concept
  • The Code
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 1.5 - Motor Ports and Configuration
  • The Situation
  • Where This Goes In Your Project
  • The Concept
    • Why reverse a motor in code?
  • The Code
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 02 - C++ for VEX PROS
Module Overview
  • Module Overview
Lesson 2.1 - What's New Here (and What's Familiar)
  • The Situation
  • The Concept
    • Things you almost certainly already know
    • Things this module teaches because PROS uses them constantly
    • Things this module teaches because they show up at specific points later
    • Things you'll meet only briefly or not at all
  • A note on what counts as "C++" vs "PROS"
  • Where This Comes Back
  • What People Get Wrong
Lesson 2.2 - Namespaces and `::`
  • The Situation
  • The Concept
    • `using` - escape hatch (use sparingly)
    • Nested namespaces
    • `::` with no namespace prefix
  • The Code (try this in a sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 2.3 - Classes and Objects
  • The Situation
  • The Concept
    • What a class definition looks like (you don't write these yet)
    • Creating an object
    • Many objects of the same class
    • What "object-oriented" means in two sentences
  • The Code (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 2.4 - Constructors and Overloading
  • The Situation
  • The Concept
    • Why parentheses, not `=`
    • Overloading: multiple constructors
    • Default arguments
  • The Code (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 2.5 - Methods and the Dot Operator
  • The Situation
  • The Concept
    • Why this matters
    • Methods that return values
    • Chaining method calls
    • `->` for pointers (rare in PROS user code)
  • The Code (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 2.6 - References and Pointers (Briefly)
  • The Situation
  • The Concept
    • References (`&`)
    • `const` references (`const T&`) - by far the most common
    • Pointers (`*`) - rarer in PROS user code
    • When you'll write each
  • The Code (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 2.7 - `const` and Const-Correctness
  • The Situation
  • The Concept
    • `const` variables
    • `const` parameters
    • `const` methods
    • When to use `const`
    • `const` is not protection against intent
  • The Code (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 2.8 - Enums and `enum class`
  • The Situation
  • The Concept
    • Old-style enum (used by PROS for historical reasons)
    • Why `enum class` (the modern form)
    • Using PROS enums
    • Writing your own `enum class`
    • When to use enums vs. `bool` vs. `int`
  • The Code (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 2.9 - Header Files and Source Files
  • The Situation
  • The Concept
    • Why split?
    • `#include` and the preprocessor
    • Include guards
    • `#pragma once` (the modern alternative)
    • `#include "..."` vs. `#include <...>`
    • Where headers live in a PROS project
    • Forward declarations (mention only)
  • The Code
  • What Went Wrong?
  • Where This Comes Back
Lesson 2.10 - Standard Library You'll Actually Use
  • The Situation
  • The Concept
    • `` - math functions
    • `` - dynamic arrays
    • `` - text strings
    • `` - useful algorithms
    • Range-for loops (works on any iterable)
    • What you won't need
  • The Code (sandbox)
  • What Went Wrong?
  • Where This Comes Back
Lesson 2.11 - Lambda Expressions
  • The Situation
  • The Concept
    • The minimal example
    • With parameters
    • Why lambdas exist
    • Captures: the `[...]` part
    • Where you'll see lambdas in this curriculum
  • The Code (sandbox)
  • What Went Wrong?
  • Where This Comes Back
Lesson 2.12 - `std::function` and Callbacks
  • The Situation
  • The Concept
    • Storing functions in containers
    • When to use `std::function` vs. a function pointer
  • The Code (sandbox)
  • What Went Wrong?
  • Where This Comes Back
Lesson 2.13 - Templates: Reading, Not Writing
  • The Situation
  • The Concept
    • Reading templated types
    • Templated functions
    • Why you don't write templates yet
  • Where You'll See Templates
  • What People Get Wrong
  • Where This Comes Back
Lesson 2.14 - Common C++ Pitfalls in Robot Code
  • The Situation
  • The Concept
    • Integer overflow in distance math
    • Implicit `int` truncation
    • Uninitialized variables
    • Variable shadowing
    • Loop iteration variable shadowing
    • Floating-point equality
    • Off-by-one in array indexing
    • Forgetting `;` after a class definition
    • Calling `pros::delay` inside a tight inner loop
    • Forgetting that `move(0)` doesn't actively brake
  • Where This Comes Back
Lesson 2.15 - Reading Compiler and Linker Errors
  • The Situation
  • The Concept
    • Standard error format
    • The "fix the first error first" rule
    • Common errors and what they actually mean
    • Compiler vs. linker
    • Warnings: pay attention
  • The Code
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • What the new `include/ports.hpp` should look like
  • What the updated `src/main.cpp` should look like (top portion)
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 03 - Math & Physics for Robotics
Module Overview
  • Module Overview
Lesson 3.1 - Why Robots Need Math
  • The Situation
  • The Concept
    • The shape of math in robot code
  • What People Get Wrong
  • Where This Comes Back
Lesson 3.2 - Coordinate Systems
  • The Situation
  • The Concept
    • The 2D field
    • Where to put the origin
    • Axis directions
    • Angle convention (and the clockwise/counterclockwise question)
    • Wait, isn't clockwise the natural positive direction?
    • Why this *also* feels natural in a top-down field view
    • The full picture (top-down field view)
    • Why this matters
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 3.3 - Angles: Degrees, Radians, and Wrapping
  • The Situation
  • The Concept
    • Why math libraries prefer radians (and why degrees feel more natural)
    • The conversion formula
    • The wrap-around problem
    • Two angle ranges to know about
    • A note on `fmod` (and why we don't use it for angles)
  • Where This Goes In Your Project
  • Try It (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 3.4 - Trigonometry: Sine, Cosine, Tangent
  • The Situation
  • The Concept
    • Sine and cosine in code
    • What sine and cosine actually compute
    • Tangent (briefly)
    • `atan2`: the angle finder
  • Where This Goes In Your Project
  • Try It (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 3.5 - Vectors: Magnitude and Direction
  • The Situation
  • The Concept
    • Magnitude (length)
    • Direction (angle)
    • Adding vectors
    • Subtracting vectors
    • Scaling a vector
    • Unit vectors (normalization)
    • Should you use a `Vector` class?
  • Where This Goes In Your Project
  • Try It (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 3.6 - Dot Products (Just Enough)
  • The Situation
  • The Concept
    • What it means geometrically
    • One concrete use: projecting one vector onto another
    • Cross products in 2D (briefly)
  • Where This Goes In Your Project
  • Try It (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 3.7 - Rate of Change (Derivative Intuition)
  • The Situation
  • The Concept
    • Why robots care about rate of change
    • A worked example
    • The discrete-vs-continuous gotcha
    • What "dt" should be
  • Where This Goes In Your Project
  • Try It (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 3.8 - Accumulation (Integral Intuition)
  • The Situation
  • The Concept
    • Why robots care about accumulation
    • A worked example
    • Integral windup: the trap
    • What "dt" should be
    • The discrete-vs-continuous gotcha (again)
  • Where This Goes In Your Project
  • Try It (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 3.9 - Torque, Force, and Power
  • The Situation
  • The Concept
    • Torque
    • Power
    • Why the 5.5W produces a quarter of the 11W's torque
    • Why your flywheel slows under load
    • Stall and current
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 3.10 - Friction, Traction, and Weight Transfer
  • The Situation
  • The Concept
    • Why traction matters
    • Static vs. kinetic friction
    • Weight transfer during acceleration and deceleration
    • Why your robot pushes some robots and gets pushed by others
    • What this means for code
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 3.11 - Center of Gravity and Tipping
  • The Situation
  • The Concept
    • Why CoG matters: the tip-over rule
    • Three things that determine tip-over risk
    • Why this matters in code (briefly)
    • The payload problem
    • Climbing ramps
    • Quick estimation: rule of thumb for tip-over
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 3.12 - Momentum and Moment of Inertia
  • The Situation
  • The Concept
    • Angular momentum and moment of inertia
    • Why this matters
    • Designing for momentum
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 3.13 - Projectile Motion: Aiming a Shot
  • The Situation
  • The Concept
    • The variables
    • The trajectory equations
    • What can go wrong: the "out of range" case
    • Worked example
    • Don't forget unit conversion
    • Why two solutions exist (briefly)
    • What this doesn't include
  • Where This Goes In Your Project
  • Try It (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 3.14 - Statistics for Run Analysis
  • The Situation
  • The Concept
    • Standard deviation (spread)
    • Sample size
    • Comparing two configurations
    • Outliers
    • When to use statistics
  • Where This Goes In Your Project
  • Try It (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Final shape of `include/math_utils.hpp`
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 04 - The Program Lifecycle
Module Overview
  • Module Overview
Lesson 4.1 - What Happens When You Hit Run
  • The Situation
  • The Concept
    • Where your global objects come in
    • `initialize()` is your "earliest legal" entry point
    • What runs *while* `initialize()` is running?
  • Where This Comes Back
  • What People Get Wrong
Lesson 4.2 - The Five Competition Functions
  • The Situation
  • The Concept
    • The lifecycle in one picture
    • `initialize()` - runs once at startup
    • `competition_initialize()` - runs once when on a competition switch
    • `autonomous()` - runs at the start of the autonomous phase
    • `disabled()` - runs while the robot is disabled
    • `opcontrol()` - runs during driver control
    • Why exactly five?
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 4.3 - Standalone vs. Competition Switch vs. Field Control
  • The Situation
  • The Concept
    • Standalone mode
    • Competition switch mode
    • Field control mode
    • How does the brain know which mode it's in?
    • Why this matters: a common bug story
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 4.4 - Static and Global Initialization Order
  • The Situation
  • The Concept
    • Within a single source file, the order is well-defined
    • Across multiple source files, the order is NOT defined
    • Why this matters in PROS
    • The simple rule that prevents the trap
    • A concrete fix pattern
    • What about `static` inside functions?
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 4.5 - The `while(true)` Loop and the 20ms Cadence
  • The Situation
  • The Concept
    • Why `pros::delay(20)`
    • What if I use `pros::delay(0)`?
    • What if I use `pros::delay(100)`?
    • What about `disabled()`?
    • What about `autonomous()`?
    • The shape of a complete loop body
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 4.6 - Reading the PROS Terminal
  • The Situation
  • The Concept
    • `pros terminal`: the receiving end
    • A complete debugging workflow
    • What to print
    • Format specifiers you'll use
    • `pros::lcd::print` vs. `printf`
    • Performance: `printf` is not free
    • Is `printf` thread-safe?
  • The Code
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • What the new `main.cpp` should look like
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 05 - Tank & Arcade Drive
Module Overview
  • Module Overview
Lesson 5.1 - The Simplest Tank Drive
  • The Situation
  • The Concept
  • Where This Goes In Your Project
  • The Code
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 5.2 - Motor Groups
  • The Situation
  • The Concept
  • Where This Goes In Your Project
  • The Code
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 5.3 - Arcade Drive
  • The Situation
  • The Concept
    • Single-stick vs. split-stick arcade
    • What if `throttle + turn` exceeds 127?
  • Where This Goes In Your Project
  • The Code
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 5.4 - Deadzone
  • The Situation
  • The Concept
    • Picking a deadzone value
    • Where to apply the deadzone
  • Where This Goes In Your Project
  • The Code
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 5.5 - Drive Curves: Polynomial
  • The Situation
  • The Concept
    • Squaring (quadratic curve)
    • Cubing (cubic curve)
    • Adjustable polynomial (general form)
    • Different strengths for throttle vs. turn
  • Where This Goes In Your Project
  • The Code
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 5.6 - Drive Curves: Exponential (5225A)
  • The Situation
  • The Concept
    • Comparing exponential to polynomial
    • Why exponential at all?
    • Visualizing the shape
  • Where This Goes In Your Project
  • The Code
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 5.7 - Drive Curves: LemLib-Style
  • The Situation
  • The Concept
    • Picking the parameters
  • Where This Goes In Your Project
  • The Code
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 5.8 - Curvature Drive (Cheesy Drive)
  • The Situation
  • The Concept
    • Beyond the simple version
    • Why bother?
  • Where This Goes In Your Project
  • The Code
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 5.9 - Choosing and Tuning Your Curve
  • The Situation
  • The Concept
    • A practical comparison
    • How to choose
    • Tuning workflow
    • Live tuning (a powerful trick)
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 5.10 - Slew Rate
  • The Situation
  • The Concept
    • Picking the slew rate
    • Acceleration-only slew
    • Stateful, so it needs persistent variables
  • Where This Goes In Your Project
  • The Code
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 06 - Mecanum Drive
Module Overview
  • Module Overview
Lesson 6.1 - What Mecanum Wheels Actually Do
  • The Situation
  • The Concept
    • Why diagonally?
    • Two roller orientations
    • The X-pattern (the only correct configuration)
    • The O-pattern (broken)
    • Identical-roller pattern (also broken)
    • When mecanum is worth it
  • What People Get Wrong
  • Where This Comes Back
Lesson 6.2 - The Force-Vector Intuition
  • The Situation
  • The Concept
    • Pure forward (all wheels spin forward at +T)
    • Pure right strafe (FL+BR forward, FR+BL backward)
    • Pure clockwise rotation (FL+BL forward, FR+BR backward)
    • Combining: forward + strafe + turn
  • Where This Comes Back
  • What People Get Wrong
Lesson 6.3 - The Mecanum Equations
  • The Situation
  • The Concept
    • Verification table
    • Combined motion: forward-right diagonal
    • Why normalize
    • When normalization matters
    • Should you always normalize?
  • Where This Goes In Your Project
  • Try It (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 6.4 - Implementing Mecanum in PROS
  • The Situation
  • The Concept
    • Joystick axis assignments
    Where This Goes In Your Project
    • Step 2: Update `main.cpp` motor declarations
    • Step 3: Add file-scope state for slew
    • Step 4: Rewrite `opcontrol()`
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 6.5 - Mecanum Tuning (Strafe Is Weaker, Compensate)
  • The Situation
  • The Concept
    • The fix: scale strafe up
    • Tuning the scale factor
    • Diagnosing wheel pattern errors
    • Per-axis curve tuning
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 6.6 - Where Mecanum Bites You
  • The Situation
  • The Concept
    • Encoder-based distance tracking is unreliable
    • Ramps and uneven terrain
    • Roller debris
    • Subsequent modules: code adaptation
    • Pushing power and weight distribution
    • Drive curves interact with strafe scaling
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 07 - X-Drive / Holonomic
Module Overview
  • Module Overview
Lesson 7.1 - X-Drive vs. Mecanum
  • The Situation
  • The Concept
    • Mechanical difference vs. mecanum
    • Why X-drive is more mechanically efficient
    • What this means in practice
    • Why teams choose X-drive over mecanum
    • Why teams choose mecanum over X-drive
  • Where This Comes Back
  • What People Get Wrong
Lesson 7.2 - The X-Drive Equations
  • The Situation
  • The Concept
    • Why identical?
    • Verification table
    • Should you always normalize?
  • Where This Goes In Your Project
  • Try It (sandbox)
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 7.3 - Implementing X-Drive in PROS
  • The Situation
  • The Concept
    • Joystick axis assignments
    Where This Goes In Your Project
    • Step 2: Update `main.cpp` motor declarations
    • Step 3: Add file-scope state for slew
    • Step 4: Rewrite `opcontrol()`
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 7.4 - Rotational Compensation
  • The Situation
  • The Concept
    • The visual
    • The fix: scale rotation down
    • Tuning workflow
    • Why this isn't a strafe-scaling problem
    • Combined: rotation gain plus optional input scaling
  • Where This Goes In Your Project
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 7.5 - X-Drive Trade-Offs
  • The Situation
  • The Concept
    • What X-drive struggles with
    • When to choose X-drive
    • Things you'll need to adapt
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 08 - Other Drivetrains: H-Drive, Swerve, Multi-Wheel
Module Overview
  • Module Overview
Lesson 8.1 - H-Drive (Five-Wheel)
  • The Situation
  • The Concept
    • How it works
    • Why teams choose H-drive
    • Why teams choose against H-drive
    • When H-drive is the right call
  • Where This Comes Back
  • What People Get Wrong
Lesson 8.2 - Programming H-Drive
  • The Situation
  • The Concept
    • Joystick mapping
    • Motor declarations
    • Pipeline
    • No normalization needed
    Where This Goes In Your Project
    • Step 2: Update `main.cpp` motor declarations
    • Step 3: Add file-scope state for slew
    • Step 4: Rewrite `opcontrol()`
    Run It
    • What to expect for strafe speed
  • What Went Wrong?
  • Where This Comes Back
Lesson 8.3 - Swerve Drive in VEX
  • The Situation
  • The Concept
    • How swerve drives
    • Why swerve is powerful
    • Why swerve is rare in VEX
    • What this curriculum will and won't teach
    • Lazy susan / single-pivot variants
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 8.4 - 6-Wheel and 8-Wheel Tank
  • The Situation
  • The Concept
    • The trade-offs
    • Drop center mechanics (6-wheel)
    Where This Goes In Your Project
    • 6-wheel tank
    • 8-wheel tank
    • Code changes from Module 05
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 8.5 - Differential Drives with a Flex Chassis
  • The Situation
  • The Concept
    • When flex helps
    • When flex hurts
    • Code implications
    • Tuning implications
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Reading 1: H-Drive opcontrol
  • Reading 2: Swerve module skeleton
  • Reading 3: 6-Wheel Tank declarations
  • Reading 4: Flex Chassis (Lesson 8.5 conceptual)
  • Cross-Drivetrain Analysis
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 09 - Field-Centric Control
Module Overview
  • Module Overview
Lesson 9.1 - Robot-Centric vs. Field-Centric
  • The Situation
  • The Concept
    • What this looks like in practice
    • Why this matters most for omnidirectional drivetrains
    • Cognitive load comparison
    • When robot-centric is still better
  • Where This Comes Back
  • What People Get Wrong
Lesson 9.2 - The Rotation Matrix
  • The Situation
  • The Concept
    • What we need to compute
    • The 2D rotation formula
    • Joystick-to-field-frame mapping
    • Putting it together
    • Verification at four cardinal headings
    • Where the angles come from
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 9.3 - Implementing Field-Centric in PROS
  • The Situation
  • The Concept
    • The pipeline addition
    • A helper function
    Where This Goes In Your Project
    • Step 2: Update `main.cpp` declarations
    • Step 3: Calibrate the IMU in `initialize()`
    • Step 4: Apply field-centric in `opcontrol()`
    • Step 5: Confirm calibration before driving
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 9.4 - Zeroing the Heading
  • The Situation
  • The Concept
    • Fixing it
    • The re-zero button
    • Where to put the re-zero button
    • Re-zeroing during autonomous
  • Where This Goes In Your Project
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 9.5 - Hybrid Modes
  • The Situation
  • The Concept
    • Implementation: hold-button mode
    • Implementation: toggle button
    • Visual indicator
    • Combining with other button bindings
  • Where This Goes In Your Project
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 9.6 - When IMU Drift Breaks It
  • The Situation
  • The Concept
    • Why it gets worse over time
    • What it feels like to drive
    • Mitigation 1: Periodic re-zeroing
    • Mitigation 2: Improve IMU quality
    • Mitigation 3: Sensor fusion (Module 19)
    • Mitigation 4: Recalibration mid-match
    • Mitigation 5: Accept the drift
    • What level of mitigation do you need?
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 10 - Mechanisms I: Motors and Buttons
Module Overview
  • Module Overview
Lesson 10.1 - One Button, One Motor
  • The Situation
  • The Concept
    • Button naming conventions
    • Power level for intakes
    Where This Goes In Your Project
    • Step 2: Declare the motor in `main.cpp`
    • Step 3: Add to `opcontrol()`
  • The Code
  • Run It
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 10.2 - Bidirectional Mechanisms
  • The Situation
  • The Concept
    • Which goes first?
    • Button choices
  • Where This Goes In Your Project
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 10.3 - Toggle Buttons (`get_digital_new_press`)
  • The Situation
  • The Concept
    • Why `static`
    • Connecting toggle state to motor command
    • State diagram
  • Where This Goes In Your Project
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 10.4 - Voltage, Velocity, and Position Modes
  • The Situation
  • The Concept
    • Voltage mode
    • Velocity mode
    • Position mode
    • Choosing modes for the Module Project
    • A quick comparison table
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 10.5 - Brake Modes on Mechanisms
  • The Situation
  • The Concept
    • When to use each
    • Why brake modes matter for lifts
    • Setting brake mode in `initialize()`
    • The hidden cost of HOLD
  • Where This Goes In Your Project
  • What Just Happened
  • What People Get Wrong
  • Where This Comes Back
Lesson 10.6 - Soft Limits
  • The Situation
  • The Concept
    • Defining the limits
    • Clamping vs. ignoring
    • Soft limits vs. hard limits
    • Where to enforce the limits
  • Where This Goes In Your Project
  • What Just Happened
  • What People Get Wrong
  • Where This Comes Back
Lesson 10.7 - Anti-Jam Logic
  • The Situation
  • The Concept
    • Recovery: back off briefly
    • State maintenance with a counter
    • Where to put the struct
    • Tuning the thresholds
    • Other mechanisms
    • Limitations
  • Where This Goes In Your Project
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 10.8 - Mechanism Presets
  • The Situation
  • The Concept
    • Using the cycler
    • When does the motor stop moving?
    • Soft limits with presets
    • Bidirectional cycling
    • Direct-preset buttons (alternative)
    • State diagram for cycling
    Where This Goes In Your Project
    • Step 2: Declare the lift
    • Step 3: Set up the preset cycler
    • Step 4: Configure in `initialize()`
    • Step 5: Bind the cycle button in `opcontrol()`
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 11 - Mechanisms II: Pneumatics
Module Overview
  • Module Overview
Lesson 11.1 - Why Pneumatics At All
  • The Situation
  • The Concept
    • What pneumatics don't do well
    • The decision rule
    • A common pattern: pneumatic + motor
  • Where This Comes Back
  • What People Get Wrong
Lesson 11.2 - Toggling a Single-Acting Solenoid
  • The Situation
  • The Concept
    • Toggle pattern
    • State diagram
    Where This Goes In Your Project
    • Step 2: Declare the pneumatic in `main.cpp`
    • Step 3: Add the toggle binding in `opcontrol()`
  • Run It
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 11.3 - Double-Acting Solenoids
  • The Situation
  • The Concept
    • Comparison diagram
    • When to use each
    • Air consumption
    • Code pattern
    • Brief gotcha: solenoid type isn't always obvious
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 11.4 - Air Budget Management
  • The Situation
  • The Concept
    • How to estimate yours
    • Budgeting across a match
    • Tracking remaining actuations
    • Should you refuse to actuate when the counter hits 0?
    • Conservative actuation patterns
  • Where This Goes In Your Project
  • What Just Happened
  • What People Get Wrong
  • Where This Comes Back
Lesson 11.5 - Pneumatic State Tracking
  • The Situation
  • The Concept
    • Why a pointer (not a reference)
    • When to query state
    • What this struct doesn't do
  • Where This Goes In Your Project
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 11.6 - Multiple Pistons, One Button
  • The Situation
  • The Concept
    • What can go wrong
    • Air budget for paired pneumatics
    • Coordinating different types
    • Toggle vs. coordinated state
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 11.7 - Pneumatics in Autonomous
  • The Situation
  • The Concept
    • Actuation timing
    • Counting actuations across autonomous and driver control
    • Don't actuate during the wait
    • Asynchronous patterns
  • Where This Goes In Your Project
  • What Just Happened
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 12 - Mechanisms III: State Machines
Module Overview
  • Module Overview
Lesson 12.1 - When Booleans Stop Scaling
  • The Situation
  • The Concept
    • The illegal-state problem in general
    • The state machine alternative
    • When booleans are still fine
    • A motivating diagram
  • Where This Comes Back
  • What People Get Wrong
Lesson 12.2 - Finite State Machines as a Concept
  • The Situation
  • The Concept
    • A state diagram
    • The notational vocabulary
    • What state machines are good for
    • What state machines aren't good for
    • A subtle point: state vs. data
  • Where This Comes Back
  • What People Get Wrong
Lesson 12.3 - Implementing with `enum class`
  • The Situation
  • The Concept
    • Declaring the state variable
    • The action: a switch statement
    • The transition: a function
    • Why the fallbac k return
    • Compile-time safety with `-Wswitch`
    • State name strings (for debugging)
  • Where This Goes In Your Project
  • What Just Happened
  • What People Get Wrong
  • Where This Comes Back
Lesson 12.4 - Three-State Intake (Off / Load / Score)
  • The Situation
  • The Concept
    • State actions
    • The full code in `opcontrol()`
    • Why these three sections
    • Why use printf in the transition
    • The transition's order matters
    • Rapid press tolerance
  • Where This Goes In Your Project
  • Run It
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 12.5 - Automatic Scoring Sequences
  • The Situation
  • The Concept
    • Sequence definition
    • State diagram for the sequence
    • Why this pattern matters
    • Mixing user input with automatic transitions
    • Pitfalls with timing
    • Compared to `pros::delay`
  • Where This Goes In Your Project
  • What Just Happened
  • What People Get Wrong
  • Where This Comes Back
Lesson 12.6 - State Machines with Sensors
  • The Situation
  • The Concept
    • Refactoring the sequence with a sensor
    • Combining sensor and time
    • State diagram with sensor transitions
    • Anti-pattern: tight polling without escape
    • What sensor reading actually looks like (preview)
  • Where This Goes In Your Project
  • What Just Happened
  • What People Get Wrong
  • Where This Comes Back
Lesson 12.7 - Debugging State Machines
  • The Situation
  • The Concept
    • Pattern 2: display the state on the LCD
    • Pattern 3: print state every N loops (sampled telemetry)
    • Pattern 4: visualize history with a trace
    • Pattern 5: assert invariants
    • Pattern 6: state machines + serial logging together
    • Common bugs and their symptoms
  • Where This Goes In Your Project
  • What Just Happened
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 13 - The Inertial Sensor (IMU)
Module Overview
  • Module Overview
Lesson 13.1 - What the IMU Actually Is
  • The Situation
  • The Concept
    • What each sensor is good at
    • What the PROS API exposes
    • What "heading" specifically means
    • The internal sampling rate
    • What the IMU doesn't do
  • Where This Comes Back
  • What People Get Wrong
Lesson 13.2 - Heading vs. Rotation
  • The Situation
  • The Concept
    • `get_rotation()`: unbounded total
    • Comparison example
    • The wrap-handling problem
    • Using `get_rotation()` to avoid wrap
    • Sign convention recap
  • Where This Goes In Your Project
  • What People Get Wrong
Lesson 13.3 - Calibration
  • The Situation
  • The Concept
    • How PROS calibration works
    • Calibration variance
    • A "better" calibration pattern
    • Checking calibration quality
    • When the robot was moving during calibration
    • What about recalibrating mid-match?
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 13.4 - Mounting Orientation
  • The Situation
  • The Concept
    • Right-side-up: the standard mount
    • Sideways mounting: heading no longer means yaw
    • Upside-down mounting
    • Why placement on the chassis matters
    • Verifying mounting
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 13.5 - IMU Drift Over Time
  • The Situation
  • The Concept
    • Drift over longer time
    • Why some IMUs drift more
    • Measuring your IMU's drift
    • Drift's effect on different code paths
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 13.6 - Mitigating Drift
  • The Situation
  • The Concept
    • Approach 1: Periodic re-zeroing
    • Approach 2: Setting a known heading
    • Approach 3: Sensor fusion with encoders
    • Approach 4: Hardware optimization
    • Approach 5: Double IMU (Lesson 13.8)
    • Choosing your mitigation
    • A practical drift budget
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 13.7 - IMU Failure Modes
  • The Situation
  • The Concept
    • Mode 2: NaN or extreme values
    • Mode 3: Stuck readings
    • Mode 4: Excessive drift
    • A unified failure handler
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 13.8 - Double-IMU Setups
  • The Situation
  • The Concept
    • Hardware setup
    • Declaration
    • Reading and averaging
    • Detecting disagreement
    • When to use two IMUs
    • Three or more IMUs
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 14 - Encoders
Module Overview
  • Module Overview
Lesson 14.1 - What an Encoder Measures
  • The Situation
  • The Concept
    • What "position" means
    • Resolution and accuracy
    • Quadrature: how encoders know direction
    • What encoders don't measure
  • Where This Comes Back
  • What People Get Wrong
Lesson 14.2 - Motor Built-In Encoders
  • The Situation
  • The Concept
    • PROS API
    • Resolution and gearing
    • When motor encoders are good enough
    • When motor encoders are NOT good enough
    • Common pattern: tare on startup
    • Reading multiple drive motors
  • Where This Goes In Your Project
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 14.3 - The V5 Rotation Sensor
  • The Situation
  • The Concept
    • PROS API
    • Use case 1: Tracking wheels (most common)
    • Use case 2: Steering position (swerve, articulated mechanisms)
    • Use case 3: Detecting rotation direction reversals
    • Mounting orientation
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 14.4 - Legacy Quadrature Encoders
  • The Situation
  • The Concept
    • PROS API
    • Use cases
    • Direction handling
    • Common mistakes
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 14.5 - Encoder-to-Distance Math
  • The Situation
  • The Concept
    • The helper function
    • Using it
    • Common wheel sizes in VEX
    • Common ticks-per-rotation values
    • Calibration considerations
    • Sources of error
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 14.6 - Wheel Slip and Why It Ruins Everything
  • The Situation
  • The Concept
    • Slip during normal driving
    • Slip when stuck
    • How to detect slip
    • How to reduce slip
    • How to handle slip when you can't reduce it
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 14.7 - Tracking Wheels
  • The Situation
  • The Concept
    • What tracking wheels enable
    • Configurations
    • Placement details
    • Mathematical setup
    • Build considerations
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 14.8 - Encoder Troubleshooting
  • The Situation
  • The Concept
    • A general debugging pattern
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 15 - Distance and Optical Sensors
Module Overview
  • Module Overview
Lesson 15.1 - Distance Sensor Fundamentals
  • The Situation
  • The Concept
    • Field of view
    • PROS API
    • Failure modes
    • Confidence value
    • Sensor mounting
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 15.2 - Wall Alignment Using Distance
  • The Situation
  • The Concept
    • Slowing down as you approach
    • Handling failure modes
    • Timeout safety
    • Blocking vs. non-blocking
    • A helper function
  • Where This Goes In Your Project
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 15.3 - Object Size and Velocity Fields
  • The Situation
  • The Concept
    • Object velocity
    • Practical use
  • Where This Comes Back
  • What People Get Wrong
Lesson 15.4 - Optical Sensor: Color
  • The Situation
  • The Concept
    • PROS API
    • Reading color reliably
    • Lighting affects readings
    • Calibrating for your venue
  • Where This Goes In Your Project
  • What Just Happened
  • What People Get Wrong
  • Where This Comes Back
Lesson 15.5 - Optical Sensor: Proximity
  • The Situation
  • The Concept
    • Typical use case
    • Range and limitations
    • Distinguishing distance sensor from optical proximity
    • Combining proximity with color
  • Where This Goes In Your Project
  • What Just Happened
  • What People Get Wrong
  • Where This Comes Back
Lesson 15.6 - The Built-In LED
  • The Situation
  • The Concept
    • PROS API
    • When to enable the LED
    • Considerations
    • Setting the LED in `initialize()`
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 15.7 - Color Sorting
  • The Situation
  • The Concept
    • The flicker problem
    • State machine for sorting
    • Mounting the optical sensor
    • Calibrating for your specific game elements
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 16 - Vision and AI Vision
Module Overview
  • Module Overview
Lesson 16.1 - Vision vs. AI Vision
  • The Situation
  • The Concept
    • V5 AI Vision Sensor (newer)
    • Side-by-side
    • Which one should your team use
    • What this module covers
  • Where This Comes Back
  • What People Get Wrong
Lesson 16.2 - Configuring Color Signatures
  • The Situation
  • The Concept
    • Two ways to configure signatures
    • Where signatures are stored
    • Multiple signatures
    • Calibration for venues
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 16.3 - Reading Vision Objects
  • The Situation
  • The Concept
    • The image coordinate system
    • Getting objects from the sensor
    • Reading per-loop telemetry
    • When the sensor returns no object
    • Filtering by size
    • Distance estimation from object size
  • Where This Goes In Your Project
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 16.4 - Aligning Using Vision
  • The Situation
  • The Concept
    • The alignment scenario
    • Proportional control
    • Tuning the gain
    • Handling no detection (the graceful behavior)
    • Combining scan + align
  • Where This Goes In Your Project
  • What Just Happened
  • Run It
  • What Went Wrong?
  • Where This Comes Back
Lesson 16.5 - AI Vision Object Detection
  • The Situation
  • The Concept
    • PROS API for AI Vision
    • Object types
    • Combining AI detection with color signatures
    • Confidence
    • Limitations
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 16.6 - AprilTags
  • The Situation
  • The Concept
    • What the sensor returns
    • Use cases in VEX
    • PROS API (AI Vision)
    • Tag ID conventions
    • Limitations
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 16.7 - AprilTags for Field Localization
  • The Situation
  • The Concept
    • Localization from one tag
    • Localization from two tags (more reliable)
    • How to use this in code
    • Periodic correction vs. continuous use
    • A simple periodic correction routine
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 16.8 - Practical Limits
  • The Situation
  • The Concept
    • Range
    • False positives
    • False negatives
    • Latency
    • Field of view
    • Power and processing
    • Reliability summary
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 17 - GPS and Absolute Positioning
Module Overview
  • Module Overview
Lesson 17.1 - The GPS Sensor
  • The Situation
  • The Concept
    • What it returns
    • Why it's drift-free
    • Why it's not perfect
    • When GPS is the right tool
    • Compared to AprilTags (Module 16)
  • Where This Comes Back
  • What People Get Wrong
Lesson 17.2 - Mounting and Offset
  • The Situation
  • The Concept
    • What the offset does
    • Configuring the offset
    • Why the offset matters
    • Heading offset
    • Verifying the offset
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 17.3 - Reading Pose from GPS
  • The Situation
  • The Concept
    • Unit conversion
    • Live display
    • Heading from GPS vs. IMU
    • What you can do with the readings
  • Where This Goes In Your Project
  • What Just Happened
  • What Went Wrong?
  • Where This Comes Back
Lesson 17.4 - Line-of-Sight Limitations
  • The Situation
  • The Concept
    • Detecting failures
    • The "stale reading" problem
    • Visibility scenarios
    • Recovery strategies
    • A status helper
  • Where This Goes In Your Project
  • What Just Happened
  • What People Get Wrong
  • Where This Comes Back
Lesson 17.5 - GPS + Odometry Fusion
  • The Situation
  • The Concept
    • The pattern
    • Why not just always use GPS?
    • Continuous fusion (more advanced)
    • When to apply correction
    • Heading fusion
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 18 - ADI Sensors: Bumpers, Limits, Potentiometers, Line Trackers
Module Overview
  • Module Overview
Lesson 18.1 - Bumper and Limit Switches
  • The Situation
  • The Concept
    • PROS API
    • Common use cases
    • Pull-up resistors and idle state
    • Failure modes
    • Mounting considerations
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 18.2 - The Potentiometer
  • The Situation
  • The Concept
    • PROS API
    • Why absolute angle matters
    • Drawbacks
    • Mounting and gearing
    • Reading and converting
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 18.3 - Using a Potentiometer for an Arm
  • The Situation
  • The Concept
    • Using the angle in control
    • Pot vs. encoder for the lift
    • Noise handling
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 18.4 - Line Trackers
  • The Situation
  • The Concept
    • PROS API
    • Typical readings
    • Line following
    • When line following is useful
    • Calibrating for your surface
    • Single-tracker uses
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 18.5 - Ultrasonic Sensors
  • The Situation
  • The Concept
    • PROS API
    • Range and resolution
    • Comparison to V5 Distance Sensor
    • Failure modes
    • Use cases
    • Pattern: drive until distance (with ADI sonar)
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 18.6 - ADI Debouncing
  • The Situation
  • The Concept
    • When bounce matters
    • Software debouncing strategies
    • When to debounce
    • Hardware debouncing
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 19 - Sensor Fusion and Filtering
Module Overview
  • Module Overview
Lesson 19.1 - Why No Single Sensor Is Enough
  • The Situation
  • The Concept
    • The information principle
    • Why combining matters
    • The classes of techniques
    • When fusion is overkill
  • Where This Comes Back
  • What People Get Wrong
Lesson 19.2 - The Low-Pass Filter
    The Concept
    • The algorithm
    • Choosing alpha
    • Implementing as a class
    • Using it
    • The latency cost
    • Why "low-pass"
    • Distinguishing from moving average
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 19.3 - The Moving Average
    The Concept
    • The algorithm
    • Window size trade-offs
    • Memory and speed
    • When to choose moving average over low-pass
    • A median filter variant
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 19.4 - Exponential Moving Average
    The Concept
    • Why bother with two names
    • Implementation
    • When to use which
  • Where This Goes In Your Project
  • What People Get Wrong
Lesson 19.5 - Complementary Filter
  • The Situation
  • The Concept
    • The formula
    • Signal flow visualization
    • Heading wraparound handling
    • Implementing as a class
    • Encoder-derived heading
    • The fused heading in code
    • Tuning alpha
    • What complementary filters don't do
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 19.6 - Introduction to Kalman Filters (Concept Only)
  • The Situation
  • The Concept
    • The intuition
    • Why it's powerful
    • Why it's not in this curriculum (in detail)
    • When Kalman might be worth it
    • Simplified pseudo-Kalman patterns
  • What People Get Wrong
  • Where This Comes Back
Lesson 19.7 - Sensor Disconnect Handling
  • The Situation
  • The Concept
    • A unified pattern
    • Filtered detection
    • Cross-checking between sensors
    • Logging failures
    • Designing for failure scenarios
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 19.8 - Designing for Graceful Degradation
  • The Situation
  • The Concept
    • A degradation cascade for a typical VEX robot
    • Per-behavior design
    • State-flag patterns
    • Communicating with the driver
    • Autonomous routines
    • When degradation isn't possible
    • Testing the degradation paths
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 20 - Multi-File Projects
Module Overview
  • Module Overview
Lesson 20.1 - When to Split Files
  • The Situation
  • The Concept
    • Finding subsystem boundaries
    • Before and after
    • Don't over-split
    • The migration is mechanical
  • Where This Comes Back
  • What People Get Wrong
Lesson 20.2 - Headers and Sources for a Single Subsystem
  • The Situation
  • The Concept
    • Declarations vs. definitions
    • The drive subsystem, split
    • The `extern` keyword for shared globals
    • Why each subsystem owns its devices
    • What goes in the header vs. the source
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 20.3 - Include Guards and `#pragma once`
  • The Situation
  • The Concept
    • `#pragma once`
    • The traditional include guard
    • Which to use
    • Why source files don't need guards
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 20.4 - Forward Declarations
  • The Situation
  • The Concept
    • The circular dependency problem
    • When you can use a forward declaration
    • Forward declarations for functions
    • Why forward declarations help compile times
    • For VEX, when does this come up
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 20.5 - Namespace Organization
  • The Situation
  • The Concept
    • Why namespaces prevent collisions
    • Namespace conventions for VEX projects
    • The `using` directive (use sparingly)
    • Anonymous namespaces for file-private code
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 20.6 - Shared Constants (`constexpr`)
  • The Situation
  • The Concept
    • Named constants
    • Why `constexpr`
    • Sharing constants across files
    • What goes in the constants file
    • What stays out of the constants file
    • Organizing the constants file
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 20.7 - The Ports File
  • The Situation
  • The Concept
    • Why ports get their own file
    • The single source of truth
    • Smart ports vs. ADI ports
    • A wiring diagram in comments
    • Verifying ports
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 20.8 - Project Folder Layout
  • The Situation
  • The Concept
    • Why this structure
    • Adding a new subsystem
    • Include paths
    • Subfolder organization (optional)
    • What not to put in src/ and include/
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 20.9 - Linker Errors and How to Fix Them
  • The Situation
  • The Concept
    • Error 1: "undefined reference to X"
    • Error 2: "multiple definition of X"
    • The one-definition rule (ODR)
    • A worked example
    • Another worked example
    • Reading linker error output
    • Prevention
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 21 - The Robot Class Pattern
Module Overview
  • Module Overview
Lesson 21.1 - The Globals Problem
  • The Situation
  • The Concept
    • Problem 1: No encapsulation, no protection
    • Problem 2: Unclear ownership
    • Problem 3: The static initialization order fiasco
    • Problem 4: Hard to reason about and test
    • Problem 5: Namespace pollution
    • The diagnosis
    • A visual contrast
  • What People Get Wrong
  • Where This Comes Back
Lesson 21.2 - A Drivetrain Class
  • The Situation
  • The Concept
    • Access control: private and public
    • The constructor
    • Why the member initializer list is necessary
    • The shape of the initializer list
    • Members with default values
    • The `initialize()` method vs. the constructor
    • Implementing the methods
    • `driveDistance` and `turnTo`: a preview of autonomous methods
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 21.3 - Drivetrain Interface Design
  • The Situation
  • The Concept
    • Principle 1: Expose intent, not mechanism
    • Principle 2: Hide the devices
    • Principle 3: Provide sensible defaults
    • Principle 4: Const-correctness
    • Principle 5: Keep the surface minimal
    • Principle 6: Group and order for readability
    • What the interface enables
    • Designing iteratively
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 21.4 - A Lift Class
  • The Situation
  • The Concept
    • The class declaration
    • A private helper method
    • The constructor and initializer list
    • The initialize method
    • The home method
    • The preset and motion methods
    • The query methods
    • What encapsulation bought us
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 21.5 - The Robot Class
  • The Situation
  • The Concept
    • Why public subsystem members
    • The Robot constructor
    • The Robot's initialize
    • Wiring into main.cpp
    • A composition diagram
    • Optionally: a Robot opcontrol method
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 21.6 - Initialization Order Problems
  • The Situation
  • The Concept
    • Rule 2: Members are constructed before the constructor body runs
    • Rule 3: Composition nests construction
    • Rule 4: The static initialization order fiasco (across translation units)
    • Rule 5: PROS and early construction
    • Putting the rules together
    • A worked debugging example
  • What People Get Wrong
  • Where This Comes Back
Lesson 21.7 - Singletons vs. Global Robot Instances
  • The Situation
  • The Concept
    • Option A: A plain global instance
    • Option B: The Meyers singleton
    • Option C: Pass the Robot by reference
    • Recommendation for VEX
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 21.8 - Migrating Existing Code
  • The Situation
  • The Concept
    • Step-by-step for one subsystem (using Intake as the example)
    • Handling the shared IMU during migration
    • Handling utility headers
    • Verifying the migration
    • What you end up with
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 22 - The Brain Screen
Module Overview
  • Module Overview
Lesson 22.1 - Text on the LCD
  • The Situation
  • The Concept
    • What it's good for
    • What it's not good for
    • The relationship between the two APIs
    • When `pros::lcd::print` is still the right call
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 22.2 - Drawing Shapes and Text
  • The Situation
  • The Concept
    • Colors
    • Clearing the screen
    • Drawing shapes
    • Positioned text
    • A worked example: a status panel
    • Building blocks for a telemetry screen
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 22.3 - Reading Touch Input
  • The Situation
  • The Concept
    • Detecting a tap on a region
    • Pressed vs. held vs. released
    • Debouncing touches
    • A touchable button helper
    • Mapping touch coordinates to drawing coordinates
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 22.4 - A Minimal UI By Hand
  • The Situation
  • The Concept
    • The selector's state
    • The layout
    • Defining the buttons
    • Drawing the selector
    • Handling touches
    • The selector loop
    • Integrating with the Robot class
    • Persistence note
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 22.5 - Performance and Refresh Rate
  • The Situation
  • The Concept
    • Update rate: 10Hz is plenty
    • Avoiding full-screen redraws
    • Measuring the impact
    • Flicker explained
    • The general principle
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 23 - LVGL: Real UI on the Brain
Module Overview
  • Module Overview
Lesson 23.1 - Introducing LVGL
  • The Situation
  • The Concept
    • The object model
    • Raw drawing vs. LVGL: a contrast
    • The event-driven shift
    • The task handler
    • The version situation, concretely
    • Why learn LVGL despite the version churn
  • Where This Comes Back
  • What People Get Wrong
Lesson 23.2 - Labels, Buttons, and Layouts
  • The Situation
  • The Concept
    • Creating a label
    • Positioning a widget
    • Creating a button
    • Setting size
    • A bar (for things like a battery indicator)
    • Putting a few widgets together
    • Keeping references for updates
    • Formatting text for labels
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 23.3 - Event Callbacks
  • The Situation
  • The Concept
    • A callback function
    • Registering the callback
    • Event types
    • Passing context with user data
    • A worked example: an LVGL autonomous selector
    • The mental model shift
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 23.4 - Styles and Themes
  • The Situation
  • The Concept
    • The version situation for styles
    • Defining and applying a style (newer LVGL representative)
    • Colors
    • Fonts
    • States
    • Themes
    • Practical advice for VEX
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 23.5 - Tabs and Screens
  • The Situation
  • The Concept
    • Putting content in tabs
    • Multiple screens (an alternative to tabs)
    • Which to use
    • Updating content in tabs
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 23.6 - Dynamic Widgets
  • The Situation
  • The Concept
    • Updating widgets from data
    • Updating styles dynamically (color by value)
    • Deleting widgets
    • The build-once, update-many pattern
    • Update rate and the task handler
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 24 - Autonomous Selectors and Pre-Match Workflow
Module Overview
  • Module Overview
Lesson 24.1 - The Selector Problem
  • The Situation
  • The Concept
    • Why re-uploading is not an option
    • The cost of a wrong selection
    • What a good selector needs
    • Where the selector runs in the match lifecycle
  • What People Get Wrong
  • Where This Comes Back
Lesson 24.2 - A Simple Button-Based Selector
  • The Situation
  • The Concept
    • Drawing the selector (raw approach, from Module 22)
    • The selector loop
    • Why a class for the selector logic
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 24.3 - The Auto Function Dispatch
  • The Situation
  • The Concept
    • Why a dispatch table can be cleaner
    • What the dispatch table buys you
    • When the switch is better
    • Routines call the Robot
    • Passing the alliance to routines
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 24.4 - Persisting Selection (SD Card)
  • The Situation
  • The Concept
    • The PROS file path
    • Writing a file
    • Reading a file
    • Error handling is essential
    • Validating loaded values
    • When to save
    • The full persistence lifecycle
    • A note on the SD card at competition
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 24.5 - Alliance Color Selection
  • The Situation
  • The Concept
    • The alliance toggle
    • Showing alliance clearly
    • Using alliance in routines
    • Using alliance for vision and sorting
    • Alliance and the "do nothing" option
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 24.6 - Controller-Side Confirmation
  • The Situation
  • The Concept
    • The rate limit (an important quirk)
    • Keep text short
    • Rumble for feedback
    • A pre-match confirmation flow
    • Why this matters in competition
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Lesson 24.7 - Telemetry That Matters Pre-Match
  • The Situation
  • The Concept
    • A readiness display
    • Implementing the checks
    • Battery: the most important check
    • IMU calibration status
    • Motor connectivity
    • The overall ready indicator
    • Connecting to graceful degradation
    • Keeping it glanceable
  • Where This Goes In Your Project
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 25 - Open-Loop Control and Why It Fails
Module Overview
  • Module Overview
Lesson 25.1 - Open-Loop Defined
  • The Situation
  • The Concept
    • A everyday analogy
    • Open-loop vs. closed-loop
    • Why open-loop is tempting
    • Have you been using open-loop?
  • What People Get Wrong
  • Where This Comes Back
Lesson 25.2 - Time-Based Control
  • The Situation
  • The Concept
    • Why the distance varies
    • The compounding problem
    • Why it's still sometimes used
    • The experiment to come
  • What People Get Wrong
  • Where This Comes Back
Lesson 25.3 - Bang-Bang Control
  • The Situation
  • The Concept
    • What bang-bang fixes
    • What bang-bang breaks: overshoot
    • Bang-bang oscillation
    • Why bang-bang is still inadequate
    • The thermostat analogy
  • What People Get Wrong
  • Where This Comes Back
Lesson 25.4 - The Feedback Idea
  • The Situation
  • The Concept
    • Why this fixes both problems
    • The simplest feedback controller: proportional
    • You've seen this already
    • Feedback is everywhere
    • The closed loop, named
  • What People Get Wrong
  • Where This Comes Back
Lesson 25.5 - Vocabulary You're About to Use
  • The Situation
  • The Concept
    • Setpoint (or target, or reference)
    • Process variable (or measured value, or actual)
    • Error
    • Controller
    • Plant (or system, or process)
    • Gain
    • Overshoot
    • Oscillation
    • Steady-state error
    • Settling time
    • Rise time
    • Open-loop vs. closed-loop
    • A glossary you'll return to
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 26 - Proportional Control
Module Overview
  • Module Overview
Lesson 26.1 - The Core Idea
  • The Situation
  • The Concept
    • Why deceleration is automatic
    • The full control loop
    • Working in inches, not ticks
    • Why clamping matters
    • The exit tolerance
    • Applying it to turning
  • What People Get Wrong
  • Where This Comes Back
Lesson 26.2 - Picking kP
  • The Situation
  • The Concept
    • A starting estimate
    • The "full output at error X" rule
    • Why units cause so many problems
    • kP for turning is different from kP for driving
    • Starting conservative
  • What People Get Wrong
  • Where This Comes Back
Lesson 26.3 - Tuning kP
  • The Situation
  • The Concept
    • The tuning loop
    • Symptom: too slow, or stalls short
    • Symptom: overshoots
    • Symptom: oscillates
    • Symptom: lurches at full speed the whole way
    • Symptom: doesn't move, or moves backward
    • The loop-rate caveat
    • Converging on a good kP
  • What People Get Wrong
  • Where This Comes Back
Lesson 26.4 - The Response Curve
  • The Situation
  • The Concept
    • The exponential approach
    • How kP changes the curve
    • Connecting to the vocabulary
    • The fundamental trade-off
  • What People Get Wrong
  • Where This Comes Back
Lesson 26.5 - Steady-State Error
  • The Situation
  • The Concept
    • Why it happens: the friction floor
    • Why kP can't fix it
    • The fix (preview): the integral term
    • Steady-state error is expected, not a bug
    • Not all systems have noticeable steady-state error
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 27 - Derivative Control
Module Overview
  • Module Overview
Lesson 27.1 - The Oscillation Problem
  • The Situation
  • The Concept
    • The root cause: blindness to velocity
    • Why lowering kP "fixes" it (but poorly)
    • The better fix: add velocity awareness
    • Oscillation in turning, too
  • What People Get Wrong
  • Where This Comes Back
Lesson 27.2 - Derivative as a Brake
  • The Situation
  • The Concept
    • What the derivative term responds to
    • The damping effect
    • The derivative opposes motion
    • Why this beats lowering kP
  • What People Get Wrong
  • Where This Comes Back
Lesson 27.3 - Computing dError/dt
  • The Situation
  • The Concept
    • The discrete ap proximation
    • The code
    • Folding dt into kD
    • The first iteration problem
    • What the derivative actually measures
  • What People Get Wrong
  • Where This Comes Back
Lesson 27.4 - Picking kD
  • The Situation
  • The Concept
    • kD is typically larger than kP (in the dt-folded form)
    • The tuning order: kP first, then kD
    • Symptoms while tuning kD
    • A practical starting point
    • kD for turning differs from kD for driving
  • What People Get Wrong
  • Where This Comes Back
Lesson 27.5 - PD Together
  • The Situation
  • The Concept
    • The full PD driveDistance
    • How the terms cooperate over a move
    • The response curve: P-only vs PD
    • The tuning summary
    • PD is often enough for VEX drive and turn
    • Applying PD to turning
  • What People Get Wrong
  • Where This Comes Back
Lesson 27.6 - Noise Sensitivity
  • The Situation
  • The Concept
    • The symptom
    • Fix 1: filter the derivative
    • Fix 2: derivative on measurement (advanced)
    • Fix 3: reduce kD or slow the derivative
    • The trade-off the derivative always carries
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 28 - Integral Control
Module Overview
  • Module Overview
Lesson 28.1 - Steady-State Error Revisited
  • The Situation
  • The Concept
    • Why the proportional term cannot close it (the friction floor)
    • Why the derivative term cannot close it either
    • The key property: the error is persistent
    • Past, present, and future
  • What People Get Wrong
  • Where This Comes Back
Lesson 28.2 - The Integral Term
  • The Situation
  • The Concept
    • How accumulation defeats the friction floor
    • The complete PID formula
    • The code
    • Why the integral closes the gap that P cannot
    • The integral has memory
  • What People Get Wrong
  • Where This Comes Back
Lesson 28.3 - Picking kI
  • The Situation
  • The Concept
    • What kI controls
    • Tuning kI: last, and gently
    • Symptoms while tuning kI
    • A starting value
    • kI and the dt convention
  • What People Get Wrong
  • Where This Comes Back
Lesson 28.4 - Integral Windup
  • The Situation
  • The Concept
    • Windup scenario 1: a blocked robot
    • Windup scenario 2: output saturation
    • Why windup is specific to the integral
    • The danger in competition
  • What People Get Wrong
  • Where This Comes Back
Lesson 28.5 - Anti-Windup Strategies
  • The Situation
  • The Concept
    • Strategy 2: clamp the integral
    • Strategy 3: stop integrating when saturated
    • Strategy 4: reset the integral for each new movement
    • Combining strategies
    • A note on advanced anti-windup
  • What People Get Wrong
  • Where This Comes Back
Lesson 28.6 - When to Skip I Entirely
  • The Situation
  • The Concept
    • When PD is enough
    • When the integral is worth it
    • The decision
    • The PID class supports both
    • Why this lesson matters
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • The reusable PID class
  • Using it in the Drivetrain
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 29 - Feedforward Control
Module Overview
  • Module Overview
Lesson 29.1 - The Reactive Limit of PID
  • The Situation
  • The Concept
    • The flywheel example
    • Why reaction inherently lags
    • The feedforward idea: act before the error
    • Feedforward is informed open-loop
    • When feedforward helps most
  • What People Get Wrong
  • Where This Comes Back
Lesson 29.2 - Static Feedforward (kS)
  • The Situation
  • The Concept
    • The kS term
    • Where kS helps
    • kS in the velocity feedforward picture
    • Finding kS
  • What People Get Wrong
  • Where This Comes Back
Lesson 29.3 - Velocity Feedforward (kV)
  • The Situation
  • The Concept
    • The kV term
    • The flywheel payoff
    • kV for the drivetrain
    • kV is the most broadly useful feedforward term
    • Velocity control, not position control, for a flywheel
  • What People Get Wrong
  • Where This Comes Back
Lesson 29.4 - Acceleration Feedforward (kA)
  • The Situation
  • The Concept
    • The kA term
    • The full feedforward (so far)
    • kA matters mainly for motion profiling
    • kA is often the least critical term
  • What People Get Wrong
  • Where This Comes Back
Lesson 29.5 - Gravity Feedforward (kG)
  • The Situation
  • The Concept
    • The kG term for a lift (constant gravity)
    • The kG term for an arm (angle-dependent gravity)
    • Gravity feedforward vs. the integral term
    • The arm holding example
  • What People Get Wrong
  • Where This Comes Back
Lesson 29.6 - Characterizing Your System
  • The Situation
  • The Concept
    • Measuring kS (static friction)
    • Measuring kV (velocity slope)
    • Measuring kA (acceleration)
    • Measuring kG (gravity)
    • Automated tools (a note)
    • Characterization is per-mechanism
    • Re-characterize when things change
  • What People Get Wrong
  • Where This Comes Back
Lesson 29.7 - PID + Feedforward Combined
  • The Situation
  • The Concept
    • The division of labor
    • Why this is better than PID alone
    • Implementing it with the PID class
    • A subtlety: the integral term and feedforward
    • The professional standard
  • What People Get Wrong
  • Where This Comes Back
Lesson 29.8 - Flywheel Control Revisited
  • The Situation
  • The Concept
    • Velocity control, not position
    • PID alone: the sag
    • Feedforward plus PID: holding steady
    • Why the feedforward helps so much here
    • Take-back-half: a flywheel-specific alternative
    • Implementation sketch
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 30 - Motion Profiling
Module Overview
  • Module Overview
Lesson 30.1 - Why Profile at All
  • The Situation
  • The Concept
    • Problem 1: wheel slip
    • Problem 2: harsh motion
    • Problem 3: feedforward has no target
    • What a profile gives you
    • The plan and the follower
  • What People Get Wrong
  • Where This Comes Back
Lesson 30.2 - The Trapezoidal Profile
  • The Situation
  • The Concept
    • Position is the area under the velocity curve
    • The geometry: defining the profile
    • The triangle case (short moves)
    • Why constant acceleration
    • The same idea for turning
  • What People Get Wrong
  • Where This Comes Back
Lesson 30.3 - Implementing a Trapezoid Generator
  • The Situation
  • The Concept
    • The profile state
    • The generator class
    • Sampling each loop
    • Working in consistent units
    • The generator is pure math
  • What People Get Wrong
  • Where This Comes Back
Lesson 30.4 - Following a Profile with PID + Feedforward
  • The Situation
  • The Concept
    • The control structure
    • The code
    • Why feedforward does the bulk
    • The position PID tracks a moving target
    • Tuning the combined controller
  • What People Get Wrong
  • Where This Comes Back
Lesson 30.5 - S-Curve Profiles
  • The Situation
  • The Concept
    • The S-curve smooths the corners
    • The cost: complexity and a little time
    • When to use the S-curve
    • The general principle: bounding higher derivatives
  • What People Get Wrong
  • Where This Comes Back
Lesson 30.6 - Constraints: Max Velocity, Max Acceleration
  • The Situation
  • The Concept
    • Max acceleration: the traction limit (or less)
    • The trade-off
    • Connecting to the physics
    • The limits are per-robot and per-configuration
    • Storing the limits
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 31 - Your First Autonomous
Module Overview
  • Module Overview
Lesson 31.1 - What the Autonomous Period Is
  • The Situation
  • The Concept
    • The strategic role
    • The `autonomous()` function
    • What can go wrong
    • The autonomous mindset
  • What People Get Wrong
  • Where This Comes Back
Lesson 31.2 - Time-Based Autonomous
  • The Situation
  • The Concept
    • Time is wrong for driving
    • A useful rule: time for mechanisms, sensors for position
    • Even mechanism time can drift
    • A time-based routine, as a counter-example
    • A short delay is sometimes a stopgap
  • What People Get Wrong
  • Where This Comes Back
Lesson 31.3 - Encoder-Based Driving
  • The Situation
  • The Concept
    • Why this is so much better than time
    • The blocking call style
    • Driving backward
    • What can go wrong
    • Tolerance and timeout
  • What People Get Wrong
  • Where This Comes Back
Lesson 31.4 - IMU-Based Turning
  • The Situation
  • The Concept
    • Absolute vs. relative turns
    • Angle wrapping
    • IMU calibration matters
    • Turn-in-place vs. swing turns
    • Tolerance and timeout for turns
  • What People Get Wrong
  • Where This Comes Back
Lesson 31.5 - Stringing Movements Together
  • The Situation
  • The Concept
    • Action types you have
    • Letting mechanisms keep running during drives
    • Combining a turn with a mechanism
    • Pauses between actions
    • A complete first-routine example
  • What People Get Wrong
  • Where This Comes Back
Lesson 31.6 - Routine Organization
  • The Situation
  • The Concept
    • Named segments via helper functions
    • Comments at segment boundaries
    • Consistent structure
    • Where helpers live
    • Constants for routine numbers
    • The pattern, summarized
  • What People Get Wrong
  • Where This Comes Back
Lesson 31.7 - Debug Telemetry for Autonomous Development
  • The Situation
  • The Concept
    • Print at each step
    • Brain screen telemetry during runs
    • Logging to the SD card (preview)
    • Telemetry survives the routine
    • Less is more (on the field)
  • What People Get Wrong
  • Where This Comes Back
Lesson 31.8 - The Iteration Loop
  • The Situation
  • The Concept
    • Set up for iteration
    • Run the routine multiple times before changing anything
    • What to change
    • The "good enough" judgment
    • The first-day humility
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 32 - PID-Driven Autonomous
Module Overview
  • Module Overview
Lesson 32.1 - From Module 31 Movements to PID
  • The Situation
  • The Concept
    • Gap 1: a drive controls distance, not heading
    • Gap 2: turns have options the routine is not using
    • Gap 3: the routine stops at every waypoint
    • The plan
    • The biggest single win: heading correction
  • What People Get Wrong
  • Where This Comes Back
Lesson 32.2 - Heading Correction While Driving
  • The Situation
  • The Concept
    • Capturing the target heading
    • The heading-corrected drive
    • Tuning the heading correction
    • The dramatic before-and-after
    • Driving straight is the foundation
  • What People Get Wrong
  • Where This Comes Back
Lesson 32.3 - Point Turns with PID
  • The Situation
  • The Concept
    • The point-turn controller
    • Turning has different dynamics than driving
    • Tuning the point turn
    • Point-turn tolerance
    • When the point turn is the right choice
  • What People Get Wrong
  • Where This Comes Back
Lesson 32.4 - Swing Turns
  • The Situation
  • The Concept
    • The swing-turn controller
    • Holding the pivot side
    • When a swing turn helps
    • When to stick with a point turn
    • The trade-off
  • What People Get Wrong
  • Where This Comes Back
Lesson 32.5 - Angle Wrapping Done Right
  • The Situation
  • The Concept
    • The wrap function
    • The boundary cases
    • get_heading versus get_rotation
    • Turning to a heading versus rotating by an amount
    • Wrapping is everywhere headings are compared
  • What People Get Wrong
  • Where This Comes Back
Lesson 32.6 - Chaining with Shared Exit Conditions
  • The Situation
  • The Concept
    • The idea: exit intermediate moves early
    • Implementing early exit
    • Carrying momentum through waypoints
    • When to settle precisely
    • The judgment
  • What People Get Wrong
  • Where This Comes Back
Lesson 32.7 - A PID-Driven Match Autonomous
  • The Situation
  • The Concept
    • The constants, with tolerances
    • Choosing point versus swing turns in the routine
    • Verifying the upgrade
    • The iteration is the same, the results are tighter
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 33 - Competition Autonomous
Module Overview
  • Module Overview
Lesson 33.1 - Route Planning
  • The Situation
  • The Concept
    • The time budget
    • Prioritize by value
    • Plan the ending position
    • Plan around the opponent and partner
    • From plan to code
  • What People Get Wrong
  • Where This Comes Back
Lesson 33.2 - Alliance Color Mirroring
  • The Situation
  • The Concept
    • What mirrors and what does not
    • The mirroring helper
    • One routine, both alliances
    • Mirroring with helper functions
    • Verify the mirror on the actual field
    • The alliance comes from the selector
  • What People Get Wrong
  • Where This Comes Back
Lesson 33.3 - Conditional Routes
  • The Situation
  • The Concept
    • Implementing a conditional branch
    • When conditional routes help
    • The cost: harder to test
    • Simple conditions are reliable conditions
    • Defaulting safely
  • What People Get Wrong
  • Where This Comes Back
Lesson 33.4 - The Abort Pattern
  • The Situation
  • The Concept
    • Movements report success or failure
    • The routine checks and aborts
    • Abort versus recover
    • What "safe" means in an abort
    • Why the abort pattern matters in competition
  • What People Get Wrong
  • Where This Comes Back
Lesson 33.5 - Defensive Autonomous
  • The Situation
  • The Concept
    • When to play defense
    • Staying legal
    • Implementing a defensive routine
    • Defense and the selector
    • The risk of defense
  • What People Get Wrong
  • Where This Comes Back
Lesson 33.6 - AWP Routines
  • The Situation
  • The Concept
    • An AWP-only routine
    • Implementing an AWP routine
    • When to run AWP-only
    • AWP coordination with a partner
    • The value of the guaranteed point
  • What People Get Wrong
  • Where This Comes Back
Lesson 33.7 - Partner Coordination
  • The Situation
  • The Concept
    • Divide the field
    • Coordinate the objectives
    • Coordination happens before the match
    • Designing routines to coordinate
    • Timing and paths
    • The partner you cannot control
  • What People Get Wrong
  • Where This Comes Back
Lesson 33.8 - Match-to-Match Adjustments
  • The Situation
  • The Concept
    • Choose the routine for the match-up
    • Small tweaks between matches
    • The discipline of small, reversible changes
    • Learning across matches
    • Know your routines cold
  • What People Get Wrong
  • Where This Comes Back
Lesson 33.9 - Tournament Debugging
  • The Situation
  • The Concept
    • Have a known-good fallback
    • Test on the competition field
    • Use the telemetry
    • Make small, safe changes
    • Do not make risky changes before a critical match
    • Battery and mechanical checks
    • Bring your tools
    • Stay calm
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 34 - PROS Tasks
Module Overview
  • Module Overview
Lesson 34.1 - The Blocking Problem
  • The Situation
  • The Concept
    • The problem: something else should be running
    • Workarounds that do not work well
    • The task alternative
    • What the brain is doing
  • What People Get Wrong
  • Where This Comes Back
Lesson 34.2 - FreeRTOS Under PROS
  • The Situation
  • The Concept
    • Time-slicing on one processor
    • When a task yields
    • Cooperative versus preemptive
    • The scheduler picks who runs next
    • Memory: each task has its own stack
    • What this means for your code
  • What People Get Wrong
  • Where This Comes Back
Lesson 34.3 - Your First Task
  • The Situation
  • The Concept
    • The task function shape
    • The task runs alongside the main code
    • The blocking-problem solution, in code
    • The function does not return immediately
    • The `static` matters
  • What People Get Wrong
  • Where This Comes Back
Lesson 34.4 - Lambda Tasks
  • The Situation
  • The Concept
    • The blink task as a lambda
    • Lambda captures: bringing in variables from outside
    • Capture by value versus by reference
    • Capturing `this` for class methods
    • When to use a named function versus a lambda
  • What People Get Wrong
  • Where This Comes Back
Lesson 34.5 - Task Parameters
  • The Situation
  • The Concept
    • Parameters via the C-style void pointer
    • Why the C-style approach still appears
    • The parameter must outlive the task
    • Multiple parameters via a struct
    • Which to use
  • What People Get Wrong
  • Where This Comes Back
Lesson 34.6 - Task Lifecycle
  • The Situation
  • The Concept
    • Creating and starting a task
    • Suspending and resuming
    • Deleting a task
    • The storage-duration gotcha
    • A subtle bug: the task variable destructor
    • A clean pattern: tasks owned by a class
  • What People Get Wrong
  • Where This Comes Back
Lesson 34.7 - Task Priorities
  • The Situation
  • The Concept
    • When to use higher priority
    • When to use lower priority
    • The starvation pitfall
    • Most tasks use the default
    • Priority and time-slicing
    • A useful default mental model
  • What People Get Wrong
  • Where This Comes Back
Lesson 34.8 - Reading Task State
  • The Situation
  • The Concept
    • Getting a task's state
    • Naming tasks for debugging
    • Listing all tasks
    • Use task state sparingly
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 35 - Concurrency Safety
Module Overview
  • Module Overview
Lesson 35.1 - The Race Condition
  • The Situation
  • The Concept
    • The classic increment race
    • The half-update race (the VEX case)
    • The race is intermittent
    • Multi-byte reads can race too
    • What synchronization does
  • What People Get Wrong
  • Where This Comes Back
Lesson 35.2 - Mutex: Lock, Protect, Unlock
  • The Situation
  • The Concept
    • PROS's mutex
    • Keep the critical section short
    • The forgot-to-unlock pitfall
    • Lock guards: RAII for mutexes
    • One mutex per "domain"
    • When to use a mutex
  • What People Get Wrong
  • Where This Comes Back
Lesson 35.3 - Atomic Variables
  • The Situation
  • The Concept
    • When to use atomics
    • When atomics are NOT enough
    • Atomics and the pose problem
    • Atomics and the increment race
    • Combining atomics and mutexes
  • What People Get Wrong
  • Where This Comes Back
Lesson 35.4 - Deadlocks
  • The Situation
  • The Concept
    • Self-deadlock: re-locking your own mutex
    • Holding a lock while doing slow work
    • Lock ordering: the avoidance rule
    • Avoid holding multiple locks if you can
    • Don't call other locking functions while holding a lock
    • Timeouts as a safety net
  • What People Get Wrong
  • Where This Comes Back
Lesson 35.5 - The Motor Ownership Rule
  • The Situation
  • The Concept
    • The rule: one task owns each motor
    • How this interacts with the Module 21 architecture
    • Why not use a mutex on the motor?
    • Read access is fine
    • Applying the rule to other hardware
  • What People Get Wrong
  • Where This Comes Back
Lesson 35.6 - Queues and Notifications
  • The Situation
  • The Concept
    • When notifications are appropriate
    • Queues: passing messages
    • When queues are appropriate
    • State versus messages: which to use
    • Notifications versus queues
    • These tools versus mutex-protected state
  • What People Get Wrong
  • Where This Comes Back
Lesson 35.7 - Debugging Concurrency Bugs
  • The Situation
  • The Concept
    • Stress testing
    • Logging with timestamps
    • Print less in suspected-race sections
    • Be suspicious of "it works most of the time"
    • When in doubt, use a mutex
    • Read with concurrency eyes
    • Tools (when available)
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 36 - Practical Task Patterns
Module Overview
  • Module Overview
Lesson 36.1 - Background Sensor Monitor
  • The Situation
  • The Concept
    • Polling rate matches the signal
    • The event: detecting changes, not just states
    • Signaling other tasks: shared state versus notifications
    • The monitor is independent
    • Layering: a low-level monitor and a high-level consumer
  • What People Get Wrong
  • Where This Comes Back
Lesson 36.2 - Background Intake Sorter
  • The Situation
  • The Concept
    • The sorter as part of the intake subsystem
    • The color sensor: a quick aside
    • The eject duration
    • The driver does not have to think about it
    • Tuning for false positives and negatives
  • What People Get Wrong
  • Where This Comes Back
Lesson 36.3 - Async PID Movements
  • The Situation
  • The Concept
    • The async pattern
    • Implementing async
    • Composition: two async moves and a wait
    • Motor ownership still applies
    • When to use async
    • The complexity cost
  • What People Get Wrong
  • Where This Comes Back
Lesson 36.4 - Periodic Telemetry
  • The Situation
  • The Concept
    • What goes into a sample
    • Gathering the sample safely
    • Emitting to the SD card
    • Telemetry to the screen
    • What about race conditions?
    • Telemetry survives long runs
  • What People Get Wrong
  • Where This Comes Back
Lesson 36.5 - Timeout Watchdog
  • The Situation
  • The Concept
    • The heartbeat pattern
    • What to do when the watchdog fires
    • Per-operation watchdogs
    • Choosing the staleness threshold
    • The watchdog itself
  • What People Get Wrong
  • Where This Comes Back
Lesson 36.6 - Hardware Monitor
  • The Situation
  • The Concept
    • The monitor task
    • Surfacing to the driver
    • Reacting to problems
    • Battery thresholds
    • Pre-match hardware check
  • What People Get Wrong
  • Where This Comes Back
Lesson 36.7 - Pre-Match Calibration
  • The Situation
  • The Concept
    • Where it runs
    • A representative pre-match routine
    • Motor response check
    • Sensor health checks
    • What if a check fails
    • Repeated runs
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 37 - The Concept of Odometry
Module Overview
  • Module Overview
Lesson 37.1 - Relative vs. Absolute Movement
  • The Situation
  • The Concept
    • Absolute movement: the world from the field's perspective
    • The robot needs to know where it is
    • A concrete comparison
    • Both styles still use the same underlying motions
    • Why absolute is more expressive
  • What People Get Wrong
  • Where This Comes Back
Lesson 37.2 - Error Compounding
  • The Situation
  • The Concept
    • Chaining moves: each starts where the last ended
    • A worked example: the square that does not close
    • Why this hurts in competition
    • What does NOT solve this
    • The fix is to know where you are
  • What People Get Wrong
  • Where This Comes Back
Lesson 37.3 - Why Odometry Self-Corrects
  • The Situation
  • The Concept
    • A concrete example: the square that does close
    • The error budget shifts from cumulative to per-move
    • Odometry has its own error: the noise floor
    • Why this is the central reason for odometry
    • What does NOT change
  • What People Get Wrong
  • Where This Comes Back
Lesson 37.4 - The Coordinate System Decision
  • The Situation
  • The Concept
    • Where the origin goes: three common choices
    • The axis directions
    • Angles: how heading is measured
    • Units: inches and degrees
    • Document the convention everywhere
    • The Module Project: sketch the field
  • What People Get Wrong
  • Where This Comes Back
Lesson 37.5 - What You Will Need
  • The Situation
  • The Concept
    • The IMU: heading and (sometimes) angular velocity
    • Wheel encoders: distance traveled
    • Two-wheel vs. three-wheel odometry
    • Sample rates
    • Sensor placement matters
    • The simpler option for getting started
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 38 - The Odometry Math
Module Overview
  • Module Overview
Lesson 38.1 - The Core Update Step
  • The Situation
  • The Concept
    • Three candidates for the heading
    • The midpoint update
    • A concrete example
    • Heading wrapping (or not)
    • Where the inputs come from
    • What the update does NOT need
  • What People Get Wrong
  • Where This Comes Back
Lesson 38.2 - The Small-Angle Approximation
  • The Situation
  • The Concept
    • Why the midpoint heading is the right choice for the chord
    • How much error does the approximation introduce?
    • Why VEX rates make this fine
    • The geometric intuition
    • The principle: small steps are linear
    • When the approximation breaks
  • What People Get Wrong
  • Where This Comes Back
Lesson 38.3 - The Arc-Length Correction
  • The Situation
  • The Concept
    • Rotating to the global frame
    • The handling of zero rotation
    • Comparing the two updates: a worked example
    • Why the curriculum uses the straight-line update by default
    • The relationship to the small-angle approximation
  • What People Get Wrong
  • Where This Comes Back
Lesson 38.4 - Parallel vs. Perpendicular Tracking Wheels
  • The Situation
  • The Concept
    • Perpendicular tracking wheel: lateral distance
    • The update with two tracking wheels
    • Computing the deltas from drive-motor encoders (tank drive)
    • Computing the deltas from tracking wheels
    • Tank drive vs. holonomic, in summary
    • The wheel offset complication
  • What People Get Wrong
  • Where This Comes Back
Lesson 38.5 - Heading Integration
  • The Situation
  • The Concept
    • Reading the IMU
    • Computing the delta
    • Using the unbounded rotation as an alternative
    • Heading inside the pose
    • What if the IMU is wrong?
    • Re-zeroing the heading
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 39 - Three-Wheel Odometry
Module Overview
  • Module Overview
Lesson 39.1 - The Hardware Setup
  • The Situation
  • The Concept
    • Wheel placement: the parallel wheel
    • Wheel placement: the perpendicular wheel
    • Mounting: keeping the wheels in contact
    • Wheel size: the tick-to-distance conversion
    • Sensor connections
    • Calibration before competition
  • What People Get Wrong
  • Where This Comes Back
Lesson 39.2 - Implementation
  • The Situation
  • The Concept
    • The constructor
    • Starting the background task
    • The update loop
    • Thread-safe getters and setters
    • Using it
    • The pose update rate and CPU
    • Initialization, the gotcha
  • What People Get Wrong
  • Where This Comes Back
Lesson 39.3 - Wheel Offset Measurement
  • The Situation
  • The Concept
    • The correction
    • The perpendicular wheel offset
    • Measuring the offsets
    • In code
    • Center-mounted wheels: the easy case
  • What People Get Wrong
  • Where This Comes Back
Lesson 39.4 - Calibration Tests
  • The Situation
  • The Concept
    • Test 2: rotation by a partial angle
    • Test 2b: many full rotations for additional sensitivity
    • Test 3: drive a square
    • Test 4: lateral motion (holonomic only)
    • How to run the tests
    • What "passing" means
  • What People Get Wrong
  • Where This Comes Back
Lesson 39.5 - Tuning Offsets
  • The Situation
  • The Concept
    • Tuning `INCHES_PER_TICK`
    • Tuning the parallel wheel offset
    • A simpler tuning heuristic
    • The 5-rotation test for fine tuning
    • The square test as the bar
    • The iteration loop
    • Knowing when to stop
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 40 - Two-Wheel and IMU-Only Odometry
Module Overview
  • Module Overview
Lesson 40.1 - One Tracking Wheel + IMU
  • The Situation
  • The Concept
    • The update loop
    • What you give up
    • What stays the same
    • When this configuration is right
  • What People Get Wrong
  • Where This Comes Back
Lesson 40.2 - Perpendicular-Only + IMU
  • The Situation
  • The Concept
    • The hardware
    • The update loop
    • What you give up
    • When this configuration is right
  • What People Get Wrong
  • Where This Comes Back
Lesson 40.3 - Motor Encoders + IMU (No Tracking Wheels)
  • The Situation
  • The Concept
    • The math
    • Why this is less accurate
    • Mitigating slip
    • When this configuration is right
  • What People Get Wrong
  • Where This Comes Back
Lesson 40.4 - Choosing the Right Configuration
  • The Situation
  • The Concept
    • Decision logic
    • The interface stays the same
    • The honest expectation
    • Upgrading later
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 41 - Odometry Debugging and Advanced Topics
Module Overview
  • Module Overview
Lesson 41.1 - Visualizing Pose on the Brain Screen
  • The Situation
  • The Concept
    • The brain screen
    • Mapping the field to the screen
    • Drawing the field and the robot
    • The result
    • When the visualization saves you time
  • What People Get Wrong
  • Where This Comes Back
Lesson 41.2 - Logging Pose to SD Card
  • The Situation
  • The Concept
    • The log file
    • The implementation
    • Filename strategy
    • Analyzing the log
    • Combining with control logs
  • What People Get Wrong
  • Where This Comes Back
Lesson 41.3 - Common Failure Modes
  • The Situation
  • The Concept
    • Failure 1: pose jumps wildly at startup
    • Failure 2: pose has a constant scale error
    • Failure 3: pose drifts during pure rotation
    • Failure 4: pose drifts during normal driving
    • Failure 5: IMU heading drifts over time
    • Failure 6: sensor returns a stale or impossible value
    • Failure 7: pose corrupted after a hard hit
    • Failure 8: pose is correct but movements are not
    • Failure 9: pose appears wrong but is actually correct
  • What People Get Wrong
  • Where This Comes Back
Lesson 41.4 - Correction via GPS
  • The Situation
  • The Concept
    • Reading the GPS
    • Using the GPS to correct odometry
    • A gentler approach: blending
    • Caveats
  • What People Get Wrong
  • Where This Comes Back
Lesson 41.5 - Correction via Wall Alignment
  • The Situation
  • The Concept
    • The detection: when have you hit the wall?
    • The alignment routine
    • Using it in routines
    • Two-wall alignment for full correction
    • The Module Project applies wall alignment
  • What People Get Wrong
  • Where This Comes Back
Lesson 41.6 - Correction via AprilTags
  • The Situation
  • The Concept
    • Reading AprilTags
    • The geometry
    • Using AprilTags to correct odometry
    • Limitations
    • Comparison: GPS vs. AprilTags vs. Wall Alignment
  • What People Get Wrong
  • Where This Comes Back
Lesson 41.7 - Odometry Accuracy Budget
  • The Situation
  • The Concept
    • Typical accumulations
    • When drift indicates a real problem
    • Corrections reset the budget
    • Budget for your own robot
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 42 - Move to Point
Module Overview
  • Module Overview
Lesson 42.1 - The Move-to-Point Problem
  • The Situation
  • The Concept
    • The distance
    • The heading to the target
    • The heading error
    • The structure of the controller
    • The "drive while turning" problem
    • The basic outline of `goToPoint`
  • What People Get Wrong
  • Where This Comes Back
Lesson 42.2 - Two PIDs at Once
  • The Situation
  • The Concept
    • Output limits matter
    • Tuning the distance PID
    • Tuning the heading PID
    • Combining the outputs
    • When one PID dominates
    • A practical interaction: the heading-corrupts-distance issue
  • What People Get Wrong
  • Where This Comes Back
Lesson 42.3 - Stopping Rules
  • The Situation
  • The Concept
    • The problem: arrival mid-overshoot
    • The timeout fallback
    • Detecting an overshoot
    • The combined rule
    • What "stopped" actually does
  • What People Get Wrong
  • Where This Comes Back
Lesson 42.4 - Driving Backward to a Point
  • The Situation
  • The Concept
    • Negative forward power
    • The combined `goToPoint` with direction flag
    • When to drive backward
    • Choosing forward vs. backward dynamically
  • What People Get Wrong
  • Where This Comes Back
Lesson 42.5 - Arriving with a Target Heading
  • The Situation
  • The Concept
    • When the two-step is the wrong shape
    • The "approach heading" variant
    • The "tangent" approach (a brief preview of pure pursuit)
    • Combining with backward driving
    • Naming the variants
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 43 - Pure Pursuit
Module Overview
  • Module Overview
Lesson 43.1 - The Lookahead Carrot
  • The Situation
  • The Concept
    • Why this produces smooth motion
    • Where this comes from
    • The single parameter: the lookahead distance
    • What the algorithm hides
  • What People Get Wrong
  • Where This Comes Back
Lesson 43.2 - The Pure Pursuit Algorithm
  • The Situation
  • The Concept
    • The algorithm in steps
    • The full picture
    • Why this produces a curving path
  • What People Get Wrong
  • Where This Comes Back
Lesson 43.3 - Implementing Pure Pursuit
  • The Situation
  • The Concept
    • The class shape
    • Closest-point math
    • Walking forward along the path
    • The control loop
    • Using it
  • What People Get Wrong
  • Where This Comes Back
Lesson 43.4 - Tuning Lookahead Distance
  • The Situation
  • The Concept
    • Typical values
    • The tuning procedure
    • The trade-off
    • A diagnostic: plot the actual path
    • The path resolution matters
  • What People Get Wrong
  • Where This Comes Back
Lesson 43.5 - End-of-Path Handling
  • The Situation
  • The Concept
    • The clamp-to-end approach
    • The arrival check
    • A two-mode alternative
    • Speeding up the end
  • What People Get Wrong
  • Where This Comes Back
Lesson 43.6 - Waypoints vs. Continuous Paths
  • The Situation
  • The Concept
    • Continuous paths: smooth curves
    • Generating intermediate waypoints
    • A pragmatic choice
    • The Module Project's path
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 44 - The Boomerang Controller
Module Overview
  • Module Overview
Lesson 44.1 - The Pose-to-Pose Problem
  • The Situation
  • The Concept
    • Pose-to-pose is two constraints
    • The two-step approach: arrive then turn
    • What the two-step approach gives up
    • The Boomerang idea, intuitively
  • What People Get Wrong
  • Where This Comes Back
Lesson 44.2 - The Virtual Carrot
  • The Situation
  • The Concept
    • Why the offset is proportional to distance
    • Why this makes the final heading correct
    • The lead parameter
    • A walked example
  • What People Get Wrong
  • Where This Comes Back
Lesson 44.3 - Implementing Boomerang
  • The Situation
  • The Concept
    • Why `distanceToTarget` not `distanceToCarrot` for the distance PID
    • Why a larger heading dead zone
    • Resetting the PIDs
    • Using `boomerangTo`
    • Plotting the path
  • What People Get Wrong
  • Where This Comes Back
Lesson 44.4 - Tuning the Lead Distance
  • The Situation
  • The Concept
    • Typical values
    • The tuning procedure
    • `LEAD` interacts with the heading PID gain
    • A diagnostic plot
    • When `LEAD = 0` is fine
  • What People Get Wrong
  • Where This Comes Back
Lesson 44.5 - Boomerang vs. Pure Pursuit
  • The Situation
  • The Concept
    • When to use `goToPoint`
    • When to use pure pursuit
    • When to use Boomerang
    • Composing them
    • What if you cannot decide?
    • `goToPoint` and Boomerang as one method
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 45 - Bezier and Spline Paths
Module Overview
  • Module Overview
Lesson 45.1 - Cubic Bezier Curves
  • The Situation
  • The Concept
    • The parametric formula
    • A worked sample
    • The tangent property
    • Implementing `bezierAt`
    • An alternative: de Casteljau's algorithm
  • What People Get Wrong
  • Where This Comes Back
Lesson 45.2 - Generating Bezier Paths
  • The Situation
  • The Concept
    • How many samples is enough?
    • Uniform arc-length sampling (advanced)
    • Putting it together: `generateBezierPath`
    • Using the path with pure pursuit
    • The trade-off versus hand-written waypoints
  • What People Get Wrong
  • Where This Comes Back
Lesson 45.3 - Chaining Beziers
  • The Situation
  • The Concept
    • Tangent continuity
    • A weaker form: G1 continuity
    • Building a chain in code
    • Multiple joints
    • Visual design ease
  • What People Get Wrong
  • Where This Comes Back
Lesson 45.4 - Splines: An Alternative
  • The Situation
  • The Concept
    • A simple spline example
    • Computing a spline
    • Choosing Bezier vs. spline
    • A pragmatic alternative: dense Beziers approximate a spline
  • What People Get Wrong
  • Where This Comes Back
Lesson 45.5 - Visual Path Design Tools
  • The Situation
  • The Concept
    • What tools exist
    • Why visual design helps
    • Integration with code
    • A common workflow gotcha
    • When to skip visual tools
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 46 - Advanced Path Controllers
Module Overview
  • Module Overview
Lesson 46.1 - RAMSETE
  • The Situation
  • The Concept
    • Generating the reference trajectory
    • The RAMSETE math
    • Why this is better than pure pursuit
    • What RAMSETE asks of you
    • Implementation outline
    • The `sinc` detail
  • What People Get Wrong
  • Where This Comes Back
Lesson 46.2 - LQR, Briefly
  • The Situation
  • The Concept
    • A simpler picture: PID gains as a 1D LQR
    • Why this is "brief"
    • When LQR matters
    • What you should take from this
  • What People Get Wrong
  • Where This Comes Back
Lesson 46.3 - Path Optimization Under Constraints
  • The Situation
  • The Concept
    • Constraints
    • Three categories of methods
    • Trade-offs between the methods
    • A realistic VEX workflow
    • A trap: trusting the optimizer too much
  • What People Get Wrong
  • Where This Comes Back
Lesson 46.4 - Adaptive Lookahead
  • The Situation
  • The Concept
    • Measuring local curvature
    • The lookahead formula
    • Computing curvature for the "near" path
    • Implementation outline
    • How much does this help?
    • A simpler heuristic: lookahead-by-segment
  • What People Get Wrong
  • Where This Comes Back
Lesson 46.5 - Hybrid Controllers
  • The Situation
  • The Concept
    • Designing a hybrid
    • A practical example
    • Implementing as a state machine
    • Avoiding chatter
    • When hybrid is overkill
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 47 - Skills Strategy
Module Overview
  • Module Overview
Lesson 47.1 - Reading the Game Manual for Skills
  • The Situation
  • The Concept
    • What to extract from Field setup
    • What to extract from Skills challenges
    • What to extract from Robot rules
    • Skills-specific game elements
    • The cheat sheet
    • Why this matters
  • What People Get Wrong
  • Where This Comes Back
Lesson 47.2 - Point Density Analysis
  • The Situation
  • The Concept
    • Ranking the action menu
    • Subtleties
    • Constraint: not all high-density actions can fit
    • Bonus actions and conditional density
    • A worked example
    • Where the analysis gives you leverage
  • What People Get Wrong
  • Where This Comes Back
Lesson 47.3 - Route Design
  • The Situation
  • The Concept
    • Step 1: Identify the highest-value actions
    • Step 2: Determine geographic clusters
    • Step 3: Sequence the clusters
    • Step 4: Detail the transitions
    • Step 5: Identify the final action
    • Step 6: Build the route sketch
    • Iterating
    • Common patterns
    • Considering robot constraints
    • Naming the route
  • What People Get Wrong
  • Where This Comes Back
Lesson 47.4 - Scoring Consistency Map
  • The Situation
  • The Concept
    • The consistency map: a table
    • Acceptable risk vs. unacceptable risk
    • Modifying the route based on consistency
    • Practice as the source of truth
    • When consistency surprises you
    • Risk versus reward
  • What People Get Wrong
  • Where This Comes Back
Lesson 47.5 - Time Budgeting
  • The Situation
  • The Concept
    • Building the budget table
    • The buffer is essential
    • Sources of timing data
    • What if the budget doesn't fit?
    • Variation between runs
    • The 50% rule
    • Adjusting during a season
    • Pre-routine vs. mid-routine
    • The end of the routine
  • What People Get Wrong
  • Where This Comes Back
Lesson 47.6 - The Stretch Goal
  • The Situation
  • The Concept
    • What makes a good stretch goal
    • The "attempt or skip" decision
    • Designing the stretch goal action
    • Multiple stretch goals
    • The stretch goal's role in tournament strategy
    • Practice as a stretch goal too
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 48 - Building a Skills Run
Module Overview
  • Module Overview
Lesson 48.1 - Architecting the Skills Program
  • The Situation
  • The Concept
    • Why this structure
    • Constants and configuration
    • A header and source split
    • Handling shared state
    • Recovery hooks
    • The pose-state assumption
  • What People Get Wrong
  • Where This Comes Back
Lesson 48.2 - Coding the First Draft
  • The Situation
  • The Concept
    • Filling in a phase
    • The orchestrator
    • Running v1 the first time
    • Logging during v1
    • What not to do in v1
    • The first measurement
  • What People Get Wrong
  • Where This Comes Back
Lesson 48.3 - Wall-Alignment Reset Points
  • The Situation
  • The Concept
    • Where to place reset points
    • A typical routine with reset points
    • Implementing a reset in the routine
    • Trade-off: time cost vs. accuracy gain
    • Pre-routine versus mid-routine resets
  • What People Get Wrong
  • Where This Comes Back
Lesson 48.4 - Sensor-Confirmed Scoring
  • The Situation
  • The Concept
    • What sensors can confirm
    • A pattern: confirm after the action
    • The retry budget
    • Skip-and-continue vs. abort
    • Sensor confirmation has its own failure modes
    • A worked example with explicit confirmation
  • What People Get Wrong
  • Where This Comes Back
Lesson 48.5 - Timer-Conditional Actions
  • The Situation
  • The Concept
    • Choosing the threshold
    • Multiple stretch goals
    • Mid-phase time checks
    • Per-phase budgets
    • Avoiding hard-coded thresholds
    • The check granularity
    • The pre-routine setup
  • What People Get Wrong
  • Where This Comes Back
Lesson 48.6 - The Iteration Protocol
  • The Situation
  • The Concept
    • The protocol
    • What to change first
    • Running 5 times per version
    • When a change makes things worse
    • Plateaus
    • The 80/20 rule
    • Logging that supports iteration
  • What People Get Wrong
  • Where This Comes Back
Lesson 48.7 - Version Management
  • The Situation
  • The Concept
    • A naming convention
    • A version log
v1.2 ...
  • When to start a new major version
  • Comparing versions
  • The "stable" version
  • Practical workflow
  • The discipline payoff
  • What People Get Wrong
  • Where This Comes Back
Lesson 48.8 - Breaking the Plateau
  • The Situation
  • The Concept
    • Diagnosis: what is limiting the score?
    • Re-examining the strategy
    • Common plateau-breaking strategies
    • Outside perspective
    • Iterating with a new strategy
    • Sometimes the plateau is fine
  • What People Get Wrong
  • Where This Comes Back
Lesson 48.9 - Field Variance
  • The Situation
  • The Concept
    • What is robust to variance
    • Building robustness
    • A pre-tournament checklist
    • Conservative tuning
    • Adjusting for the tournament field
  • What People Get Wrong
  • Where This Comes Back
Lesson 48.10 - Skills Under Pressure
  • The Situation
  • The Concept
    • The pre-routine checklist
    • Do not change the code on tournament day
    • Practice rounds
    • Multiple Skills attempts
    • Handling a failed run
    • Team roles
    • The post-mortem
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 49 - Why You Need a Library (and Which One)
Module Overview
  • Module Overview
Lesson 49.1 - The Case For Using a Library
  • The Situation
  • The Concept
    • Why this is not a contradiction with learning from scratch
    • A concrete time comparison
    • The "understanding through use" pattern
  • What People Get Wrong
  • Where This Comes Back
Lesson 49.2 - The Case Against Using a Library
  • The Situation
  • The Concept
    • When scratch + library hybrid wins
    • The "use everything from the library" trap
    • Migration cost
    • Stability matters
    • The decision is reversible (but not free)
  • What People Get Wrong
  • Where This Comes Back
Lesson 49.3 - The Three Libraries (Current State in 2026)
  • The Situation
  • The Concept
    • EZ-Template
    • LemLib
    • Other libraries worth knowing
    • Side-by-side comparison (high level)
  • What People Get Wrong
  • Where This Comes Back
Lesson 49.4 - Choosing for Your Team
  • The Situation
  • The Concept
    • The "quick recommendation"
    • A worked example
    • Trying before committing
    • The team agreement
  • What People Get Wrong
  • Where This Comes Back
Lesson 49.5 - The Student-Centered Policy
  • The Situation
  • The Concept
    • Why this matters for library users
    • The understanding standard
    • A sample interview question and answer
    • Documentation as understanding
    • When understanding falls short
    • The mentor's role
  • What People Get Wrong
  • Where This Comes Back
Lesson 49.6 - What the Rest of Part XI Covers
  • The Situation
  • The Concept
    • Cross-cutting modules
    • Why each library deserves its own modules
    • The Module 49 project bridges to the rest
    • A note on the curriculum's stance
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 50 - OkapiLib: Foundations
Module Overview
  • Module Overview
Lesson 50.1 - What OkapiLib Brings to the Table
  • The Situation
  • The Concept
    • Why these mattered
    • What OkapiLib does well
    • What OkapiLib does less well
    • The educational angle
  • What People Get Wrong
  • Where This Comes Back
Lesson 50.2 - The OkapiLib Mental Model
  • The Situation
  • The Concept
    • The hierarchy of abstractions
    • The builder produces shared pointers
    • Unit-typed parameters
    • Object construction follows the "configure once, use many times" pattern
    • Configuration is immutable after build
  • What People Get Wrong
  • Where This Comes Back
Lesson 50.3 - The Unit System: Why It Exists
  • The Situation
  • The Concept
    • How OkapiLib's units work
    • The literal suffixes
    • Compile-time checking
    • Unit conversions
    • Reading the value out
    • Composite units
    • Why this matters
  • What People Get Wrong
  • Where This Comes Back
Lesson 50.4 - Using Units: `24_in`, `90_deg`, `5_s`
  • The Situation
  • The Concept
    • Angle suffixes
    • Time suffixes
    • Speed suffixes
    • Composite units via arithmetic
    • Common patterns
    • Reading values out
    • Arithmetic between unit types
    • When the value is genuinely unitless
    • A common gotcha: integer literals
    • Negative values
  • What People Get Wrong
  • Where This Comes Back
Lesson 50.5 - The ChassisControllerBuilder
  • The Situation
  • The Concept
    • The general structure
    • Why the builder returns `std::shared_ptr`
    • Method overloads in the builder
    • The fluent style
    • Builder pattern in general
    • When to use which step
  • What People Get Wrong
  • Where This Comes Back
Lesson 50.6 - Configuring the Drivetrain
  • The Situation
  • The Concept
    • Overload: explicit Motor objects
    • Overload: MotorGroup objects
    • Mixing forward and reversed motors on the same side
    • Three-motor vs. four-motor configurations
    • What `.withMotors()` does internally
    • X-drive and other drive types
  • What People Get Wrong
  • Where This Comes Back
Lesson 50.7 - Configuring Dimensions
  • The Situation
  • The Concept
    • The gearset parameter
    • The ChassisScales argument
    • The wheel diameter
    • The wheel track
    • The ticks per revolution (TPR)
    • Overload: with external gear ratio
    • A complete, common configuration
    • What goes wrong
  • What People Get Wrong
  • Where This Comes Back
Lesson 50.8 - Your First OkapiLib Movement: `moveDistance`
  • The Situation
  • The Concept
    • What is happening internally
    • Heading correction
    • Overload: with max velocity
    • `moveDistanceAsync` (preview)
    • A complete first program
    • Expected behavior
    • What if the robot does not stop?
    • Multiple moves in sequence
  • What People Get Wrong
  • Where This Comes Back
Lesson 50.9 - Your First OkapiLib Turn: `turnAngle`
  • The Situation
  • The Concept
    • Relative vs. absolute semantics
    • What is happening internally
    • Point turn vs. swing turn
    • Overload: with max velocity
    • Sequencing turns and drives
    • A common bug: forgetting that turns are relative
    • A complete example
  • What People Get Wrong
  • Where This Comes Back
Lesson 50.10 - Synchronous vs. Asynchronous Movement
  • The Situation
  • The Concept
    • Asynchronous (non-blocking)
    • `waitUntilSettled` and `isSettled`
    • A practical example
    • A second example: drive and raise lift
    • When to use sync, when async
    • A subtle issue: multiple async moves
  • What People Get Wrong
  • Where This Comes Back
Lesson 50.11 - Reading Position from OkapiLib
  • The Situation
  • The Concept
    • Reading position with `getState`
    • Converting for output
    • Setting position with `setState`
    • What the coordinates mean
    • Updating during a routine
    • Setting position for re-orienting routines
    • Resetting odometry
    • What odometry does not give you
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Aside: How `24_in` Actually Compiles
    Question 1: How does `24_in` compile? It looks like a string but is not quoted.
    • The leading underscore is required
    Question 2: How does `distance / time` work? It is dividing two values with units; doesn't the division just operate on numbers?
    • What about nonsensical operations?
    • How OkapiLib actually implements this: templates
    Question 3: How is `QLength` actually implemented? Does it split the input on the underscore?
    • What about division between quantities?
  • Why this matters: the productivity payoff
  • Where else you see user-defined literals
  • Summary
Module 51 - OkapiLib: Tuning
Module Overview
  • Module Overview
Lesson 51.1 - OkapiLib's Internal PID
  • The Situation
  • The Concept
    • The PID equation
    • The gain values: very small numbers
    • How OkapiLib constructs the chassis controllers
    • Why three controllers, not one
    • Reading the controller's state
    • A note on the curriculum's mapping
  • What People Get Wrong
  • Where This Comes Back
Lesson 51.2 - Tuning the Distance PID
  • The Situation
  • The Concept
    • Starting values
    • The tuning procedure
    • Measuring accuracy
    • Common observations
    • Tuning for different load conditions
    • When to stop tuning
  • What People Get Wrong
  • Where This Comes Back
Lesson 51.3 - Tuning the Turning PID
  • The Situation
  • The Concept
    • Starting values
    • The tuning procedure
    • Measuring turn accuracy
    • Common turn issues
    • Why turn PID tuning often comes after distance
    • Tuning the angle PID (heading correction during drives)
  • What People Get Wrong
  • Where This Comes Back
Lesson 51.4 - Custom PID Controllers in OkapiLib
  • The Situation
  • The Concept
    • Using the controller
    • Setting the target
    • A worked example: a lift PID
    • Why use OkapiLib's controller for custom mechanisms
    • Tuning custom controllers
    • The velocity controller
    • Async vs. synchronous control
    • Putting it together: a coordinated routine
  • What People Get Wrong
  • Where This Comes Back
Lesson 51.5 - Settling Tolerance Configuration
  • The Situation
  • The Concept
    • Configuring through the builder
    • Tighter settling
    • Looser settling
    • When settling matters
    • Settling vs. timeout
    • Per-move settling (advanced)
    • Settling for custom controllers
    • A common mistake
  • What People Get Wrong
  • Where This Comes Back
Lesson 51.6 - Velocity Profiling in OkapiLib
  • The Situation
  • The Concept
    • The async controller for profiled motion
    • Generating a path
    • Following a path
    • Why this matters for tuning
    • Limitations
    • When velocity profiling is worth it
    • A complete profiled-motion example
  • What People Get Wrong
  • Where This Comes Back
Lesson 51.7 - Common OkapiLib Pitfalls
  • The Situation
  • The Concept
    • Pitfall 2: Wrong wheel diameter
    • Pitfall 3: Wrong wheel track
    • Pitfall 4: Wrong gearset constant
    • Pitfall 5: Forgetting to enable odometry
    • Pitfall 6: IMU port mismatch
    • Pitfall 7: PROS version mismatch
    • Pitfall 8: shared_ptr lifetime
    • Pitfall 9: Mixing `using namespace okapi` and `using namespace pros`
    • Pitfall 10: Default settling is too loose for tournament use
    • Pitfall 11: Async without waitUntilSettled
    • Pitfall 12: Multiple async chassis moves in flight
    • Pitfall 13: Tuning gains without re-running the test
    • Pitfall 14: Trusting OkapiLib's defaults blindly
  • What People Get Wrong
  • Where This Comes Back
Lesson 51.8 - When OkapiLib Falls Short
  • The Situation
  • The Concept
    • Limitation 2: PROS 4 compatibility
    • Limitation 3: Live tuning
    • Limitation 4: Path-design tool integration
    • Limitation 5: Older API conventions
    • Limitation 6: Maintenance status
    • When OkapiLib still makes sense
    • When to migrate
    • The honest summary
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 52 - OkapiLib: Advanced
Module Overview
  • Module Overview
Lesson 52.1 - 2D Motion Profiling: AsyncMotionProfileController
  • The Situation
  • The Concept
    • The builder
    • The `PathfinderLimits` struct
    • The output target
    • The async pattern
    • Storage at file scope
    • Cooperation with the chassis controllers
    • A complete minimal example
  • What People Get Wrong
  • Where This Comes Back
Lesson 52.2 - Path Generation from Waypoints
  • The Situation
  • The Concept
    • Multiple waypoints
    • Pathfinder's algorithm
    • Heading choices matter
    • Coordinate convention
    • Distance between waypoints
    • Time and trajectory
    • A practical pattern: 3-4 waypoints
  • What People Get Wrong
  • Where This Comes Back
Lesson 52.3 - Generating and Storing Paths
  • The Situation
  • The Concept
    • Path generation is slow
    • The string-name model
    • Removing paths
    • Overloads of generatePath
    • A generation log
    • Path storage location
  • What People Get Wrong
  • Where This Comes Back
Lesson 52.4 - Following a Stored Path
  • The Situation
  • The Concept
    • `waitUntilSettled`
    • `isSettled`
    • Reverse paths
    • Overloads of setTarget
    • Stopping mid-path
    • Path completion vs. settling
    • Following multiple paths in sequence
    • Mixing paths and discrete moves
  • What People Get Wrong
  • Where This Comes Back
Lesson 52.5 - Mechanism Controllers in OkapiLib
  • The Situation
  • The Concept
    • Using the velocity controller
    • When position vs. velocity
    • Tuning velocity controllers
    • Composing controllers with the chassis
    • The Settable interface
  • What People Get Wrong
  • Where This Comes Back
Lesson 52.6 - Async Controllers for Mechanisms
  • The Situation
  • The Concept
    • Using the async controller
    • `AsyncPosIntegratedController`
    • `AsyncVelControllerBuilder`
    • When async is worth it
    • Running multiple controllers
  • What People Get Wrong
  • Where This Comes Back
Lesson 52.7 - OkapiLib Odometry Configuration
  • The Situation
  • The Concept
    • Three-encoder odometry
    • Two-encoder + IMU odometry
    • TrackingWheel configuration
    • Why two-encoder needs an IMU
    • Calibration matters
    • Wall-aligned calibration
    • Mounting considerations
  • What People Get Wrong
  • Where This Comes Back
Lesson 52.8 - Reading and Using OkapiLib Odometry
  • The Situation
  • The Concept
    • Setting the pose
    • Using the pose in routines
    • Driving to a specific pose
    • Pose verification
    • Mid-routine corrections
    • Logging the pose
  • What People Get Wrong
  • Where This Comes Back
Lesson 52.9 - Building Your Own ChassisController Subclass
  • The Situation
  • The Concept
    • Two approaches
    • A wrapping example: adding Boomerang to OkapiLib
    • Why this works
    • When this approach fails
    • A subclassing example: when the base class is needed
    • Honest assessment
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 53 - EZ-Template: Setup and Project Structure
Module Overview
  • Module Overview
Lesson 53.1 - The EZ-Template Philosophy
  • The Situation
  • The Concept
    • Sensible defaults
    • Focus on user experience
    • Live tuning from the controller
    • The autonomous selector
    • Why this philosophy makes sense
    • Where the philosophy breaks down
  • What People Get Wrong
  • Where This Comes Back
Lesson 53.2 - Why You Start FROM EZ-Template
  • The Situation
  • The Concept
    • Why this works
    • The setup workflow
    • Pros and cons of this approach
    • Comparison to OkapiLib
    • Migration consequences
    • A subtle benefit: the example as documentation
  • What People Get Wrong
  • Where This Comes Back
Lesson 53.3 - Downloading and Setting Up the Example Project
  • The Situation
  • The Concept
    • The example project download
    • Extracting
    • Opening in VSCode
    • Applying the latest EZ-Template version
    • The depot system
    • Verifying the setup
    • Initial commit (if using git)
  • What People Get Wrong
  • Where This Comes Back
Lesson 53.4 - The File Layout
  • The Situation
  • The Concept
    • `src/main.cpp` - the main file
    • `src/autons.cpp` - the autonomous routines
    • `include/main.h` - the main header
    • `include/autons.hpp` - autonomous declarations
    • `firmware/` - the compiled libraries
    • `project.pros` - PROS project metadata
    • `Makefile` - the build configuration
    • What you typically edit
    • Adding your own files
  • What People Get Wrong
  • Where This Comes Back
Lesson 53.5 - Initial Configuration: Drivetrain, Cartridges, Sensors
  • The Situation
  • The Concept
    • Why each parameter matters
    • Overloads of the constructor
    • A worked example: configuring for a specific robot
    • What to NOT change
    • Sanity-checking the configuration
  • What People Get Wrong
  • Where This Comes Back
Lesson 53.6 - Tracking Wheel Configuration
  • The Situation
  • The Concept
    • The `ez::tracking_wheel` class
    • Overload 1: ADI Encoder (3-wire ports)
    • Overload 2: ADI Encoder on a Smart Port (via expander)
    • Overload 3: V5 Rotation Sensor
    • Registering tracking wheels with the chassis
    • A complete tracking wheel setup
    • Tuning the offsets
    • Without tracking wheels
  • What People Get Wrong
  • Where This Comes Back
Lesson 53.7 - IMU Configuration
  • The Situation
  • The Concept
    • Configuration
    • IMU calibration at startup
    • Mounting orientation
    • Verifying the IMU
    • Drift over time
    • Re-calibration
    • Heading conventions
  • What People Get Wrong
  • Where This Comes Back
Lesson 53.8 - Your First Build and Upload
  • The Situation
  • The Concept
    • What a build does
    • Uploading
    • Connecting to the brain
    • First run
    • The autonomous selector
    • Driving the robot
    • Running an autonomous
    • The Module Project benchmark
  • What People Get Wrong
  • Where This Comes Back
Lesson 53.9 - Common Setup Issues
  • The Situation
  • The Concept
    • Issue 2: Robot drives but turns when commanded straight
    • Issue 3: Motors fight each other (no movement)
    • Issue 4: Distances are off by a constant factor
    • Issue 5: Turns are off by a constant factor
    • Issue 6: Build fails with "cannot find EZ-Template/api.hpp"
    • Issue 7: Build succeeds but upload fails
    • Issue 8: Autonomous selector does not appear
    • Issue 9: Joysticks do not respond
    • Issue 10: Tracking wheels read zero (or wrong values)
    • The general debugging approach
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 54 - EZ-Template: Drive Control
Module Overview
  • Module Overview
Lesson 54.1 - EZ-Template Joystick Curves
  • The Situation
  • The Concept
    • The curve's mathematical shape
    • Visualizing the curve
    • EZ-Template's default
    • How the curve interacts with the drive style
    • Why the curve matters more than you think
    • Per-driver curves
  • What People Get Wrong
  • Where This Comes Back
Lesson 54.2 - Configuring the Drive Style
  • The Situation
  • The Concept
    • Split arcade
    • Single-stick arcade
    • Curvature drive
    • Choosing a style
    • Switching styles mid-match
    • What the function does internally
  • What People Get Wrong
  • Where This Comes Back
Lesson 54.3 - Live Joystick Curve Tuning with Controller Buttons
  • The Situation
  • The Concept
    • The tuning workflow
    • Saving the values
    • Disabling live tuning
    • Custom button mapping (advanced)
    • When live tuning is most useful
    • A practice protocol
  • What People Get Wrong
  • Where This Comes Back
Lesson 54.4 - Slew Configuration
  • The Situation
  • The Concept
    • Why slew matters
    • The trade-off
    • EZ-Template's slew API
    • Slew in autonomous
    • When to disable slew
    • Slew vs. curve: when to use each
    • A common setup
  • What People Get Wrong
  • Where This Comes Back
Lesson 54.5 - Curvature Drive in EZ-Template
  • The Situation
  • The Concept
    • Where curvature shines
    • Where curvature breaks down
    • EZ-Template's implementation
    • Combining with quick-turn
    • Driver feel
    • When to consider curvature
  • What People Get Wrong
  • Where This Comes Back
Lesson 54.6 - Brake Mode Configuration
  • The Situation
  • The Concept
    • When to use each
    • Default behavior
    • Active brake (P-loop on release)
    • When to switch modes mid-match
    • Brake mode and battery
    • Brake mode and motor wear
  • What People Get Wrong
  • Where This Comes Back
Lesson 54.7 - Mechanism Code Alongside EZ-Template
  • The Situation
  • The Concept
    • Why this works
    • A worked example: lift control
    • Manual control alongside PID
    • Avoiding global state issues
    • Don't block the loop
    • Subsystem class pattern
    • Tasks for completely independent behavior
  • What People Get Wrong
  • Where This Comes Back
Lesson 54.8 - Loop Timing and Performance
  • The Situation
  • The Concept
    • What happens without the delay
    • What if I want a faster loop?
    • What if my loop is too slow?
    • Profiling the loop
    • The performance of handle_* functions
    • Print statements: the silent slowdown
    • Brain screen updates
    • Tasks for heavy operations
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 55 - EZ-Template: Autonomous and Selectors
Module Overview
  • Module Overview
Lesson 55.1 - The Auto Function Structure
  • The Situation
  • The Concept
    • The setup, line by line
    • Why this is boilerplate
    • A starting pose other than (0, 0, 0)
    • Implicit completion
    • The 15-second budget
  • What People Get Wrong
  • Where This Comes Back
Lesson 55.2 - `pid_drive_set`, `pid_turn_set`, and Friends
  • The Situation
  • The Concept
    • `pid_drive_set`: forward/backward drive
    • `pid_turn_set`: turn to an absolute heading
    • `pid_turn_relative_set`: turn relative to current heading
    • `pid_swing_set`: swing turn (one side moves, the other holds)
    • `pid_arc_set`: arc turn (driving while turning)
    • A worked example
    • Speed selection
  • What People Get Wrong
  • Where This Comes Back
Lesson 55.3 - Wait Conditions: `pid_wait`, `pid_wait_until`, `pid_wait_quick`
  • The Situation
  • The Concept
    • `pid_wait_until`: wait until a checkpoint
    • `pid_wait_quick`: skip settling
    • `pid_wait_quick_chain`: motion chaining variant
    • A worked example: drive, intake, drive, score
    • Which wait to use, in summary
    • Timeout behavior
  • What People Get Wrong
  • Where This Comes Back
Lesson 55.4 - Combining Movements
  • The Situation
  • The Concept
    • Chained (smooth motion)
    • Parallel (async with mechanism)
    • Parallel (async chassis move)
    • Conditional (branching routines)
    • Timed conditions
    • Mixing patterns
  • What People Get Wrong
  • Where This Comes Back
Lesson 55.5 - The Built-In Autonomous Selector
  • The Situation
  • The Concept
    • Why this is valuable
    • How EZ-Template's selector is structured
    • The `Auton` class
    • Brain screen layout
    • Selector workflow at tournaments
    • Selector persistence
    • Disabling the selector
    • Customizing the selector display
  • What People Get Wrong
  • Where This Comes Back
Lesson 55.6 - Adding New Routines to the Selector
  • The Situation
  • The Concept
    • Step 2: declare the routine
    • Step 3: add to the selector
    • Step 4: build and upload
    • A complete workflow example
    • Naming routines for the selector
    • Ordering routines
    • Naming convention
    • Maintaining the selector
  • What People Get Wrong
  • Where This Comes Back
Lesson 55.7 - Mirroring Routines (red/blue)
  • The Situation
  • The Concept
    • EZ-Template's mirroring approach
    • Approach 3: Helper function
    • Mirroring rules
    • Adding both versions to the selector
    • A complete mirrored routine
    • Testing mirrored routines
    • Selector convention
  • What People Get Wrong
  • Where This Comes Back
Lesson 55.8 - EZ-Template Odometry Setup
  • The Situation
  • The Concept
    • The tracking_wheel constructor (Module 53 recap)
    • Registering with the chassis
    • Orientation conventions
    • Setting the polarity
    • Offset measurement
    • Without tracking wheels
    • Configuring without horizontal tracker
  • What People Get Wrong
  • Where This Comes Back
Lesson 55.9 - EZ-Template Odometry in Auto
  • The Situation
  • The Concept
    • `pid_odom_ptp_set`: point-to-point
    • `pid_odom_pp_set`: pure pursuit through points
    • `pid_odom_smooth_pp_set`: smoothed pure pursuit
    • `pid_odom_set`: the generic version
    • A common pattern: pose-based routine
    • When pose-based vs. relative
    • Setting the starting pose
    • Verifying pose during the routine
  • What People Get Wrong
  • Where This Comes Back
Lesson 55.10 - Boomerang in EZ-Template
  • The Situation
  • The Concept
    • `pid_odom_boomerang_set`: direct Boomerang
    • The smart `pid_odom_set` variant
    • How Boomerang works (recap from Module 44)
    • The `lead` parameter
    • Combining Boomerang with pure pursuit
    • A practical use case
    • Limitations
  • What People Get Wrong
  • Where This Comes Back
Lesson 55.11 - The Asynchronous Pattern
  • The Situation
  • The Concept
    • The parallel pattern
    • Why this is async
    • Polling with `pid_wait_until` or similar
    • Combining with other waits
    • A worked example: drive + lift + intake
    • Limitations of async
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 56 - EZ-Template: PID Tuning and Telemetry
Module Overview
  • Module Overview
Lesson 56.1 - The EZ-Template PID Tuner
  • The Situation
  • The Concept
    • Enabling the tuner
    • The tuner's controls
    • Showing the tuner on the brain
    • The workflow
    • After tuning
    • Why the values revert
    • When the tuner is disabled
  • What People Get Wrong
  • Where This Comes Back
Lesson 56.2 - Tuning Drive PID
  • The Situation
  • The Concept
    • Starting values
    • The tuning procedure
    • Why kI is usually 0
    • Distance-dependent behavior
    • Common observations
    • Tuning for the robot's load
    • Saving the tuned values
  • What People Get Wrong
  • Where This Comes Back
Lesson 56.3 - Tuning Turn PID
  • The Situation
  • The Concept
    • Starting values
    • The tuning procedure
    • What "stable" means for turns
    • Distance-of-turn sensitivity
    • Multi-turn complications
    • Wheel-track dependence
  • What People Get Wrong
  • Where This Comes Back
Lesson 56.4 - Tuning Swing PID
  • The Situation
  • The Concept
    • Starting values
    • Forward vs. reverse swings
    • The tuning procedure
    • `opp_side_power` and tuning
    • Common swing observations
  • What People Get Wrong
  • Where This Comes Back
Lesson 56.5 - Tuning Odometry PID
  • The Situation
  • The Concept
    • Starting values
    • The tuning procedure
    • Boomerang-specific tuning
    • Pure pursuit tuning
    • The relationship to drive and turn PIDs
    • When odometry tuning is harder
  • What People Get Wrong
  • Where This Comes Back
Lesson 56.6 - The Telemetry System
  • The Situation
  • The Concept
    • The controller display
    • Terminal printf
    • EZ-Template's built-in logging
    • Reading the logs during a routine
    • Custom telemetry pages
  • What People Get Wrong
  • Where This Comes Back
Lesson 56.7 - Reading Built-In Logging
  • The Situation
  • The Concept
    • The exit codes
    • Investigating non-normal exits
    • Position accuracy from logs
    • Time data from logs
    • Custom log additions
    • Disabling EZ-Template's logs
  • What People Get Wrong
  • Where This Comes Back
Lesson 56.8 - Customizing Internals: When and How
  • The Situation
  • The Concept
    • The setup.hpp file
    • When to edit setup.hpp
    • Exit condition tuning
    • Editing the library source
    • Customization via composition
  • What People Get Wrong
  • Where This Comes Back
Lesson 56.9 - The Judge Interview: Explaining EZ-Template Without Black Boxes
  • The Situation
  • The Concept
    • A judge's typical questions
    • Mapping library calls to curriculum concepts
    • Demonstrating understanding through diagnosis
    • The honest "we use a library" answer
    • Practice the explanations
  • What People Get Wrong
  • Where This Comes Back
Lesson 56.10 - EZ-Template Source Tour
  • The Situation
  • The Concept
    • Where the code lives
    • The major files
    • Reading the PID implementation
    • Reading the move functions
    • Reading the odometry implementation
    • When to look at the source
    • Source as documentation
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 57 - LemLib: Setup and Configuration
Module Overview
  • Module Overview
Lesson 57.1 - The LemLib Mental Model
  • The Situation
  • The Concept
    • Why this layered approach
    • Comparison to EZ-Template
    • Comparison to OkapiLib
    • Object lifetime
    • Pointer semantics
    • What the chassis exposes
  • What People Get Wrong
  • Where This Comes Back
Lesson 57.2 - Installing LemLib in a PROS Project
  • The Situation
  • The Concept
    • Adding the LemLib depot
    • Applying LemLib to the project
    • Verifying the installation
    • Including LemLib in your code
    • A minimal test
    • Updating LemLib
    • The PROS terminal
  • What People Get Wrong
  • Where This Comes Back
Lesson 57.3 - Version Compatibility
  • The Situation
  • The Concept
    • PROS compatibility
    • Version differences: 0.4 to 0.5
    • Version differences: 0.5 to 0.6
    • Choosing a version
    • Locking the version
    • Reading release notes
    • Patch updates
  • What People Get Wrong
  • Where This Comes Back
Lesson 57.4 - The Chassis Class
  • The Situation
  • The Concept
    • The Chassis object's role
    • Why pass references vs. pointers vs. values
    • A canonical setup
    • What you do not declare
    • Multiple chassis (advanced)
  • What People Get Wrong
  • Where This Comes Back
Lesson 57.5 - Configuring the Drivetrain
  • The Situation
  • The Concept
    • Motor groups
    • Track width
    • Wheel diameter via the Omniwheel namespace
    • Drivetrain RPM
    • Horizontal drift
    • A complete drivetrain example
  • What People Get Wrong
  • Where This Comes Back
Lesson 57.6 - Configuring Sensors (IMU, Tracking Wheels)
  • The Situation
  • The Concept
    • The TrackingWheel class
    • The offset value
    • The OdomSensors structure
    • Common configurations
    • Why redundancy helps
  • What People Get Wrong
  • Where This Comes Back
Lesson 57.7 - Configuring Lateral PID
  • The Situation
  • The Concept
    • kP, kI, kD: the PID gains
    • antiWindup
    • Small error range and timeout
    • Large error range and timeout
    • Slew (maximum acceleration)
    • A complete linear controller example
    • Why nine parameters
  • What People Get Wrong
  • Where This Comes Back
Lesson 57.8 - Configuring Angular PID
  • The Situation
  • The Concept
    • Why the values differ
    • Tuning the angular controller
    • Settling for turns
    • Slew for turns
    • A complete angular controller
    • When the angular tuning is wrong
  • What People Get Wrong
  • Where This Comes Back
Lesson 57.9 - Initial Calibration: Drive Test
  • The Situation
  • The Concept
    • Required initialization
    • Running the test
    • Measuring accuracy
    • What can go wrong (and what it tells you)
    • Adding pose feedback
    • A diagnostic checklist
  • What People Get Wrong
  • Where This Comes Back
Lesson 57.10 - Common Setup Errors
  • The Situation
  • The Concept
    • Error 2: Robot drives sideways during a "straight" move
    • Error 3: Distances are off by a constant factor
    • Error 4: Turns are off
    • Error 5: Build fails with "lemlib not declared"
    • Error 6: PROS version mismatch
    • Error 7: Robot does not settle
    • Error 8: Tracking wheels read wrong direction
    • Error 9: Tracking wheel offset is wrong
    • Error 10: IMU port collision
    • Error 11: Wrong horizontal drift coefficient
    • Error 12: Forgetting to call `calibrate()`
    • A systematic debugging approach
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 58 - LemLib: Movement Primitives and Tuning
Module Overview
  • Module Overview
Lesson 58.1 - `chassis.moveToPoint`
  • The Situation
  • The Concept
    • The MoveToPointParams struct
    • Example calls
    • How `moveToPoint` works internally
    • Exit conditions for `moveToPoint`
    • Coordinate system reminder
    • A worked example
  • What People Get Wrong
  • Where This Comes Back
Lesson 58.2 - `chassis.moveToPose`
  • The Situation
  • The Concept
    • The MoveToPoseParams struct
    • How `moveToPose` works internally
    • Example calls
    • When to use `moveToPose` vs. `moveToPoint`
    • A worked example
    • Boomerang tuning
  • What People Get Wrong
  • Where This Comes Back
Lesson 58.3 - `chassis.turnToHeading`
  • The Situation
  • The Concept
    • The TurnToHeadingParams struct
    • Example calls
    • Absolute heading meaning
    • The shortest-direction rule
    • A worked example
  • What People Get Wrong
  • Where This Comes Back
Lesson 58.4 - `chassis.turnToPoint`
  • The Situation
  • The Concept
    • The TurnToPointParams struct
    • How it works
    • Example calls
    • When to use `turnToPoint` vs. `turnToHeading`
    • A worked example
    • Combining with `moveToPoint`
  • What People Get Wrong
  • Where This Comes Back
Lesson 58.5 - Exit Conditions: Distance, Time, Settling
  • The Situation
  • The Concept
    • The settling parameters (from ControllerSettings)
    • How the conditions interact
    • The timeout parameter
    • The earlyExitRange
    • Reading which condition fired
    • Tuning for the accuracy bar
  • What People Get Wrong
  • Where This Comes Back
Lesson 58.6 - Speed and Direction Modifiers
  • The Situation
  • The Concept
    • minSpeed: floor on the motor command
    • earlyExitRange: triggering exit before settling
    • forwards: direction of travel
    • direction: which way to turn
    • Combining modifiers
    • A summary table
  • What People Get Wrong
  • Where This Comes Back
Lesson 58.7 - Async Movements and the Wait Pattern
  • The Situation
  • The Concept
    • `chassis.waitUntilDone()`
    • A parallel pattern
    • `chassis.cancelMotion()`
    • `chassis.waitUntil(error)`
    • Polling pattern
    • Multiple async motions
    • A complete async routine
  • What People Get Wrong
  • Where This Comes Back
Lesson 58.8 - Tuning Lateral PID in LemLib
  • The Situation
  • The Concept
    • The starting values
    • A test routine
    • Adjusting kP
    • Adjusting kD
    • Adjusting kI
    • Adjusting exit conditions
    • Testing at multiple distances
    • The tuning workflow
  • What People Get Wrong
  • Where This Comes Back
Lesson 58.9 - Tuning Angular PID in LemLib
  • The Situation
  • The Concept
    • Test routine
    • Adjusting kP for turns
    • Adjusting kD for turns
    • Adjusting kI for turns
    • Testing at multiple angles
    • Wheel track and turn accuracy
    • Exit conditions for angular
    • The procedure summary
  • What People Get Wrong
  • Where This Comes Back
Lesson 58.10 - Boomerang Controller Tuning
  • The Situation
  • The Concept
    • Effect of lead values
    • Visualizing the lead
    • Tuning the lead
    • When lead matters less
    • Geometry-aware tuning
  • What People Get Wrong
  • Where This Comes Back
Lesson 58.11 - Chained Movements
  • The Situation
  • The Concept
    • The chaining technique
    • Critical pairing: minSpeed and earlyExitRange
    • The chaining workflow
    • Tuning minSpeed and earlyExitRange
    • Chaining turns
    • Cancellation for chaining
    • A complete chained routine
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 59 - LemLib: Pure Pursuit and Path Planning
Module Overview
  • Module Overview
Lesson 59.1 - LemLib Pure Pursuit Architecture
  • The Situation
  • The Concept
    • Why this is different from `moveToPoint` chains
    • How LemLib's pure pursuit works internally
    • The path file format
    • Path resolution
    • When pure pursuit shines
  • What People Get Wrong
  • Where This Comes Back
Lesson 59.2 - The `chassis.follow` Function
  • The Situation
  • The Concept
    • The ASSET macro
    • The static directory
    • A basic example
    • Multiple paths in one routine
    • Forward vs. backward path
    • Async path following
    • Starting pose matters
  • What People Get Wrong
  • Where This Comes Back
Lesson 59.3 - PATH.JERRYIO Introduction
  • The Situation
  • The Concept
    • Why use a visual designer
    • The path.jerryio workflow
    • Field-aligned coordinates
    • Heading values in path.jerryio
    • Saving and version control
    • Browser-based access
  • What People Get Wrong
  • Where This Comes Back
Lesson 59.4 - Drawing a Path Visually
  • The Situation
  • The Concept
    • Adding control points
    • Bezier handles
    • Smooth vs. sharp transitions
    • A typical path
    • Iterating on the path
    • Coordinate readout
    • Saving and loading
    • A worked example: a simple S-curve path
  • What People Get Wrong
  • Where This Comes Back
Lesson 59.5 - Constraints and Speeds in PATH.JERRYIO
  • The Situation
  • The Concept
    • Modifying speed per segment
    • Automatic deceleration at corners
    • Automatic deceleration at the end
    • Acceleration constraints
    • Match your robot's capabilities
    • Per-section deceleration zones
    • A practical example: Skills routine speeds
  • What People Get Wrong
  • Where This Comes Back
Lesson 59.6 - Exporting and Using Path Files
  • The Situation
  • The Concept
    • Format options
    • Placing the file in the project
    • The ASSET macro
    • Using in autonomous
    • Multiple paths
    • The tarball format (for many paths)
    • Verifying the integration
    • A typical commit
  • What People Get Wrong
  • Where This Comes Back
Lesson 59.7 - Lookahead Distance Tuning
  • The Situation
  • The Concept
    • Visualization
    • Recommended starting values
    • Tuning procedure
    • Per-path lookahead
    • Lookahead interaction with speed
    • What "too small" looks like
    • What "too large" looks like
    • A tuning checklist
    • Comparison to angular PID tuning
  • What People Get Wrong
  • Where This Comes Back
Lesson 59.8 - Path Constraints: Speed and Acceleration
  • The Situation
  • The Concept
    • The path's speed at each point
    • Acceleration constraints
    • Tuning max speed
    • Tuning max acceleration
    • Combining with the lateral PID
    • Speed profile visualization
    • A typical profile for VEX
  • What People Get Wrong
  • Where This Comes Back
Lesson 59.9 - Combining Pure Pursuit with Discrete Movements
  • The Situation
  • The Concept
    • When discrete moves are right
    • The combined pattern
    • Path-to-discrete transitions
    • Discrete-to-pure transitions
    • A mixed example
    • Sensor-driven branching
    • Parallel mechanisms during pure pursuit
  • What People Get Wrong
  • Where This Comes Back
Lesson 59.10 - Debugging Path Following
  • The Situation
  • The Concept
    • Issue 2: The robot drives in the wrong direction
    • Issue 3: The robot tries to drive to the path's end
    • Issue 4: The robot wobbles along the path
    • Issue 5: The robot cuts corners
    • Issue 6: The robot stops mid-path
    • Issue 7: The path ends at the wrong place
    • Issue 8: Build errors with the ASSET
    • Issue 9: The robot follows but the timing is off
    • Issue 10: Slight drift between path designed and path followed
    • General debugging approach
  • What People Get Wrong
  • Where This Comes Back
Lesson 59.11 - LemLib Telemetry and Logging
  • The Situation
  • The Concept
    • Viewing the logs
    • Custom pose logging
    • Continuous pose logging
    • Brain screen display
    • Logging path progress
    • Combining with sensor logs
    • When to log heavily
    • A complete diagnostic routine
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 60 - Combining Libraries with Custom Code
Module Overview
  • Module Overview
Lesson 60.1 - The Library Owns the Chassis
  • The Situation
  • The Concept
    • What "the chassis" includes
    • What is NOT the chassis
    • The boundary
    • Common temptations to violate the principle
    • When the principle does NOT apply
  • What People Get Wrong
  • Where This Comes Back
Lesson 60.2 - Mechanism Code Is Always Yours
  • The Situation
  • The Concept
    • What mechanism code includes
    • The PID for mechanisms
    • The pattern: state machine + PID
    • Mechanism code in opcontrol
    • Mechanism code in autonomous
    • The boundary is clean
  • What People Get Wrong
  • Where This Comes Back
Lesson 60.3 - Sharing State Between Library and Custom Code
  • The Situation
  • The Concept
    • Reading the pose
    • Setting the pose
    • Influencing motion
    • A common pattern: react to a sensor during a motion
    • A common pattern: pose-aware decisions
    • Avoiding library internals
    • When the API has gaps
  • What People Get Wrong
  • Where This Comes Back
Lesson 60.4 - Vision-Driven Movement on Top of LemLib
  • The Situation
  • The Concept
    • The camera-to-field transformation
    • The scoring sequence
    • Refining the approach
    • Multiple targets
    • Vision sensor limitations
    • The role of LemLib
  • What People Get Wrong
  • Where This Comes Back
Lesson 60.5 - GPS Correction on Top of EZ-Template Odometry
  • The Situation
  • The Concept
    • The GPS sensor's output
    • The correction pattern
    • Why a confidence threshold
    • Why not full GPS-only
    • Discontinuity from corrections
    • A complete integration
    • LemLib equivalent
  • What People Get Wrong
  • Where This Comes Back
Lesson 60.6 - Custom Selectors with EZ-Template / LemLib Underneath
  • The Situation
  • The Concept
    • The selector's components
    • A simple selector
    • A more polished selector
    • A graphical selector
    • The selector is independent of the library
    • Adding sub-selection
    • The competition switch
  • What People Get Wrong
  • Where This Comes Back
Lesson 60.7 - Logging Library Internals
  • The Situation
  • The Concept
    • Pose logging via the library's public API
    • Motion target logging
    • Continuous pose logging
    • Combining library and custom state
    • Logging at decision points
    • Logging to SD card
    • Throttling logs
    • What not to log
  • What People Get Wrong
  • Where This Comes Back
Lesson 60.8 - When to Override Library Behavior
  • The Situation
  • The Concept
    • The legitimate cases
    • The override options
    • Contributing back
    • The maintenance question
    • A worked example: fixing a small bug
    • When to walk away
  • What People Get Wrong
  • Where This Comes Back
Lesson 60.9 - The "Hybrid Stack" Pattern in Practice
  • The Situation
  • The Concept
    • What each layer looks like
    • Why this architecture
    • Common variations
    • A code review checklist
    • The competitive payoff
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 61 - Library Comparison and Migration
Module Overview
  • Module Overview
Lesson 61.1 - Honest Feature-by-Feature Comparison
  • The Situation
  • The Concept
    • OkapiLib
    • EZ-Template
    • LemLib
    • A summary table
    • What the comparison does not show
  • What People Get Wrong
  • Where This Comes Back
Lesson 61.2 - Performance: Real-World Skills Runs
  • The Situation
  • The Concept
    • What top teams use
    • The library is not the difference
    • Practical examples
    • Where the library does matter
    • The honest performance summary
  • What People Get Wrong
  • Where This Comes Back
Lesson 61.3 - Tuning Effort by Library
  • The Situation
  • The Concept
    • Tuning workflow: edit-build-upload (OkapiLib, LemLib)
    • Tuning workflow: live tuner (EZ-Template)
    • Total session estimates
    • When tuning matters less
    • Re-tuning after changes
    • The "tune once, then iterate paths" pattern
  • What People Get Wrong
  • Where This Comes Back
Lesson 61.4 - Migrating from Raw PROS to Each Library
  • The Situation
  • The Concept
    • Migrating to OkapiLib
    • Migrating to EZ-Template
    • Migrating to LemLib
    • What stays the same
    • Timing the migration
    • What "raw PROS" migration is not
  • What People Get Wrong
  • Where This Comes Back
Lesson 61.5 - Migrating Between Libraries (and why you usually shouldn't)
  • The Situation
  • The Concept
    • The cost of migration
    • What you gain
    • When migration is worth it
    • When migration is NOT worth it
    • The pragmatic answer
    • A worked counter-example
    • Migration plan if you decide
    • The strategic mindset
  • What People Get Wrong
  • Where This Comes Back
Lesson 61.6 - Maintaining Library + Custom Code Long Term
  • The Situation
  • The Concept
    • Documentation as insurance
    • Versioning the library
    • Year-to-year transitions
    • Custom code's long tail
    • Multi-season library choice
    • Mentoring the next generation
    • A maintenance routine
  • What People Get Wrong
  • Where This Comes Back
Lesson 61.7 - The Judge Interview Across All Three Libraries
  • The Situation
  • The Concept
    • The library-specific framings
    • The library-to-curriculum mapping
    • The diagnostic style
    • When the team uses multiple libraries
    • Practicing the explanation
    • A library-agnostic principle
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 62 - Vision in Autonomous
Module Overview
  • Module Overview
Lesson 62.1 - Vision-Guided Approach
  • The Situation
  • The Concept
    • The canonical pattern
    • Reading the AI Vision Sensor
    • Camera-to-field transformation
    • When to switch from odometry to vision
    • Fallback when vision fails
    • Iterative refinement
  • What People Get Wrong
  • Where This Comes Back
Lesson 62.2 - AprilTag-Based Localization
  • The Situation
  • The Concept
    • VEX's AprilTag system
    • The localization concept
    • A simple AprilTag-based correction
    • The AprilTag pose-from-angle problem
    • When to correct
    • Multiple tags in view
    • Tag placement strategy
  • What People Get Wrong
  • Where This Comes Back
Lesson 62.3 - AI Vision Object Tracking
  • The Situation
  • The Concept
    • When to use AI Classifications
    • Reading AI Classifications
    • Filtering by class
    • Confidence and filtering
    • Tracking moving objects
    • Combining AI Classifications with other detection modes
  • What People Get Wrong
  • Where This Comes Back
Lesson 62.4 - Vision Pipeline Latency
  • The Situation
  • The Concept
    • The naive approach fails
    • The compensated approach: snapshot the pose at detection time
    • A latency-compensated control loop
    • Frequency tuning
    • Smoothing
    • When latency does not matter
  • What People Get Wrong
  • Where This Comes Back
Lesson 62.5 - Lighting Robustness
  • The Situation
  • The Concept
    • The mitigations
    • The pre-tournament checklist
    • Calibration during the match
    • Validation: cross-check vision against odometry
    • Practical numbers
    • The competitive payoff
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 63 - Data Logging and Analysis
Module Overview
  • Module Overview
Lesson 63.1 - What to Log
  • The Situation
  • The Concept
    • The core columns
    • What to NOT log
    • When event markers help
    • Logging frequency
    • The two-second rule
  • What People Get Wrong
  • Where This Comes Back
Lesson 63.2 - SD Card Logging Strategy
  • The Situation
  • The Concept
    • FAT32 required
    • File naming patterns
    • Directory structure
    • Handling missing SD card
    • Handling write failures
    • The header row
    • Appending vs. overwriting
    • The CSV format
    • A complete file lifecycle
  • What People Get Wrong
  • Where This Comes Back
Lesson 63.3 - Writing CSV at 50Hz Without Hitching
  • The Situation
  • The Concept
    • The solution: keep the file open
    • The fflush pattern
    • The dedicated logging task
    • State sharing between control code and logger
    • Avoiding mid-routine fflush stalls
    • Pre-allocating the buffer
    • The 50 Hz timing
  • What People Get Wrong
  • Where This Comes Back
Lesson 63.4 - Downloading Logs
  • The Situation
  • The Concept
    • When to download
    • File organization on the computer
    • Backup strategy
    • Naming the files for clarity
    • Reading the files on the computer
  • What People Get Wrong
  • Where This Comes Back
Lesson 63.5 - Analysis in Python or a Spreadsheet
  • The Situation
  • The Concept
    • A useful first plot: x-y trajectory
    • Time-series plots
    • Python with pandas
    • Comparing multiple runs
    • Statistics across runs
    • Filtering by event
    • A simple dashboard
    • When to use each
  • What People Get Wrong
  • Where This Comes Back
Lesson 63.6 - Finding Bugs by Data
  • The Situation
  • The Concept
    • Pattern 2: motion overshoot
    • Pattern 3: loop hitches
    • Pattern 4: battery voltage drop
    • Pattern 5: motor stall
    • Pattern 6: vision detection oscillation
    • Pattern 7: phase timing exceeds budget
    • A bug-finding worked example
    • The diagnosis workflow
    • When the data doesn't show the bug
  • What People Get Wrong
  • Where This Comes Back
Lesson 63.7 - Continuous Monitoring Across Practice Runs
  • The Situation
  • The Concept
    • The team data spreadsheet
    • Detecting regressions
    • Practices for continuous monitoring
    • The dashboard concept
    • The pre-tournament check
    • The off-season retrospective
    • The cultural benefit
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 64 - Multi-Brain and Advanced Comms
Module Overview
  • Module Overview
Lesson 64.1 - When Two Brains Are Legal
  • The Situation
  • The Concept
    • VURC (collegiate): one brain per robot, but two robots per team
    • VEX AI: depends on the specific game
    • Non-competition contexts
    • What about external processors?
    • The decision tree
    • Lessons 64.4 and 64.5 apply universally
  • What People Get Wrong
  • Where This Comes Back
Lesson 64.2 - Smart Radio Between Brains
  • The Situation
  • The Concept
    • Pairing two brains
    • The PROS API for brain-to-brain comms
    • Connection state and reliability
    • Update rates
    • Bandwidth budget
    • When to send what
  • What People Get Wrong
  • Where This Comes Back
Lesson 64.3 - Protocol Design
  • The Situation
  • The Concept
    • A simple text-based protocol
    • A binary protocol for efficiency
    • Message framing
    • Sequencing and ordering
    • Error handling
    • Versioning
    • A complete VURC alliance protocol
    • Logging the protocol
  • What People Get Wrong
  • Where This Comes Back
Lesson 64.4 - Controller-to-Brain Custom Protocols
  • The Situation
  • The Concept
    • The controller screen as feedback
    • Rumble for feedback
    • Button combinations
    • Long vs. short presses
    • A custom selector via the controller
    • Vibration as a status channel
  • What People Get Wrong
  • Where This Comes Back
Lesson 64.5 - USB-Based Debug Bridges
  • The Situation
  • The Concept
    • Beyond text: structured streaming
    • A computer-side parser
    • A live plot
    • A web-based dashboard
    • Logging while streaming
    • Limitations
    • Combined with the controller
  • What People Get Wrong
  • Where This Comes Back
Module Project (Conditional)
  • Project Goal
  • Acceptance Criteria (if applicable)
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions (apply to all readers, regardless of project)
Module 65 - Auto-Tuning and Advanced Control
Module Overview
  • Module Overview
Lesson 65.1 - The Ziegler-Nichols Method
  • The Situation
  • The Concept
    • What "sustained oscillation" looks like
    • Measuring Pu
    • The Z-N table
    • A worked VEX example
    • Why Z-N produces aggressive gains
    • The Tyreus-Luyben alternative
    • When Z-N does not apply
    • The cultural context
  • What People Get Wrong
  • Where This Comes Back
Lesson 65.2 - Step Response Analysis
  • The Situation
  • The Concept
    • The four key metrics
    • Capturing the step response
    • Interpreting the curve shape
    • A worked diagnosis
    • Comparing step responses
    • Multi-target step tests
    • Caveats
  • What People Get Wrong
  • Where This Comes Back
Lesson 65.3 - Closed-Loop vs. Open-Loop Characterization
  • The Situation
  • The Concept
    • Open-loop characterization
    • The advantage of open-loop
    • The risk of open-loop
    • When closed-loop is sufficient
    • When open-loop matters more
    • The hybrid approach
    • Safety notes for any test
  • What People Get Wrong
  • Where This Comes Back
Lesson 65.4 - Real-Time On-Robot Tuning
  • The Situation
  • The Concept
    • Building a tuner for libraries without one
    • The systematic Z-N workflow on the robot
    • Logging during tuning
    • Automated tuning loops
    • The realistic time budget
  • What People Get Wrong
  • Where This Comes Back
Lesson 65.5 - Gain Scheduling
  • The Situation
  • The Concept
    • The simplest gain scheduling
    • Continuous gain scheduling
    • Battery compensation
    • Distance-based gain scheduling
    • Verifying gain scheduling
    • When gain scheduling is not worth it
    • Adaptive control: beyond gain scheduling
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 66 - Version Control with Git
Module Overview
  • Module Overview
Lesson 66.1 - What Git Actually Is
  • The Situation
  • The Concept
    • What Git tracks
    • The four areas in Git's mental model
    • What a commit is
    • What a branch is
    • Distributed: every copy is a full copy
    • A complete example
    • Why this is worth learning
  • What People Get Wrong
  • Where This Comes Back
Lesson 66.2 - Your First Repository
  • The Situation
  • The Concept
    • Initializing a repository
    • The first commit
    • The standard cycle
    • Writing good commit messages
    • Viewing history
    • Going back to a previous commit
    • Undoing changes (before commit)
    • Commit frequency
    • What NOT to commit
  • What People Get Wrong
  • Where This Comes Back
Lesson 66.3 - Branching
  • The Situation
  • The Concept
    • Creating a branch
    • Switching between branches
    • The main / dev pattern
    • A feature branch example
    • Listing branches
    • When branches are overkill
    • Branch hygiene
  • What People Get Wrong
  • Where This Comes Back
Lesson 66.4 - Remote Repositories and GitHub
  • The Situation
  • The Concept
    • Creating a GitHub account
    • Creating a remote repository
    • Connecting your local repository
    • Daily push and pull
    • Cloning a repository
    • Adding teammates
    • Public vs private
    • SSH vs HTTPS
    • Backup as a benefit
    • What GitHub adds beyond git
  • What People Get Wrong
  • Where This Comes Back
Lesson 66.5 - Merging and Conflict Resolution
  • The Situation
  • The Concept
    • Three-way merges
    • Conflicts
    • A conflict example
    • Using a merge tool
    • Preventing conflicts
    • Aborting a merge
    • Pull requests on GitHub
    • Rebase: an alternative to merge
    • A "do not panic" attitude
  • What People Get Wrong
  • Where This Comes Back
Lesson 66.6 - `.gitignore` for PROS Projects
  • The Situation
  • The Concept
    • How `.gitignore` works
    • A PROS-specific `.gitignore`
    • Adapting for your team
    • Common mistakes
    • Already committed files
    • Verifying `.gitignore` works
    • Per-project vs global
    • Templates and tools
  • What People Get Wrong
  • Where This Comes Back
Lesson 66.7 - Tagging Releases
  • The Situation
  • The Concept
    • Creating a tag
    • Tag naming conventions
    • Listing tags
    • Going back to a tagged version
    • Pushing tags to GitHub
    • When to tag
    • Tags for team handoff
    • GitHub Releases
  • What People Get Wrong
  • Where This Comes Back
Lesson 66.8 - Git Disaster Recovery
  • The Situation
  • The Concept
    • Common disasters and recovery
    • The reflog as ultimate safety net
    • Recovery patterns by context
    • The most destructive commands
    • Recovery as a skill
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 67 - Team Collaboration
Module Overview
  • Module Overview
Lesson 67.1 - Pull Requests
  • The Situation
  • The Concept
    • When to use PRs
    • The PR workflow
    • Writing a good PR description
Risks
  • PR size
  • Self-review before submitting
  • Draft PRs
  • PRs in a solo workflow
  • What People Get Wrong
  • Where This Comes Back
Lesson 67.2 - Code Review Etiquette
  • The Situation
  • The Concept
    • The reviewer's tone
    • The reviewer's options
    • Severity levels
    • Receiving feedback
    • Disagreement resolution
    • Self-review (for solo work)
    • What to look for during review
    • Time budget
  • What People Get Wrong
  • Where This Comes Back
Lesson 67.3 - Issue Tracking
  • The Situation
  • The Concept
    • Creating an issue
    • Issue labels
    • Linking issues to PRs
    • Issue states
    • Milestones
    • The triage workflow
    • Issues for the long-term backlog
    • Issues as documentation
    • Issue volume
  • What People Get Wrong
  • Where This Comes Back
Lesson 67.4 - Task Ownership
  • The Situation
  • The Concept
    • Component ownership
Vision and logging
  • Issue ownership
  • The "I'll take it" pattern
  • Avoiding two people on the same thing
  • Handoff when an owner is unavailable
  • Workload balancing
  • Single points of failure
  • Decision-making
  • What People Get Wrong
  • Where This Comes Back
Lesson 67.5 - Merge Strategies
  • The Situation
  • The Concept
    • Merge commit: full history
    • Squash and merge: clean history
    • Rebase and merge: linear history
    • Recommendation for VEX teams
    • Squash and merge: the commit message
    • Branching strategy implications
    • Reverting a merge
    • Hot fixes
  • What People Get Wrong
  • Where This Comes Back
Lesson 67.6 - Continuous Integration (Lightly)
  • The Situation
  • The Concept
    • GitHub Actions
    • A minimal PROS CI workflow
    • What CI catches
    • Branch protection rules
    • Beyond build: linting and formatting
    • Build time and feedback loop
    • CI in a solo workflow
    • CI failure as a signal
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 68 - Code That Outlives a Season
Module Overview
  • Module Overview
Lesson 68.1 - Why a New Game Does Not Mean a New Codebase
  • The Situation
  • The Concept
    • The third path
    • What this buys you
    • The cost, stated honestly
  • What People Get Wrong
  • Where This Comes Back
Lesson 68.2 - Stable Infrastructure vs. Game-Specific Logic
  • The Situation
  • The Concept
    • What is stable, in VEX terms
    • What is game-specific, in VEX terms
    • The one rule: dependencies point one way
    • A worked sort
  • What People Get Wrong
  • Where This Comes Back
Lesson 68.3 - Designing Classes You Can Reuse
  • The Situation
  • The Concept
    • The fix: parameterize by configuration
    • The principle: behavior in the library, identity in the season
    • A config struct for many parameters
    • The test, again
  • What People Get Wrong
  • Where This Comes Back
Lesson 68.4 - Approach 1: The Season Template Repository
  • The Situation
  • The Concept
    • Why this is the right first step
    • The cost: no single source of truth
    • Managing the cost: the retrospective sync
    • When this is enough
  • What People Get Wrong
  • Where This Comes Back
Lesson 68.5 - Approach 2: A Team Library and Git Submodules
  • The Situation
  • The Concept
    • The single source of truth
    • Pinning: why a season does not auto-update
    • Cloning a project that has a submodule
    • Updating the library pointer
    • Wiring the submodule into the PROS build
  • What People Get Wrong
  • Where This Comes Back
Lesson 68.6 - Approach 3: Packaging a PROS Template
  • The Situation
  • The Concept
    • Building the template
    • Consuming the template in a season
    • Hosting versions
    • The tradeoff versus submodules
  • What People Get Wrong
  • Where This Comes Back
Lesson 68.7 - Versioning the Library and Flowing Fixes Back
  • The Situation
  • The Concept
    • Record the version in the season
Library
  • Fix bugs in the library, not just the season
  • Semantic-ish versioning, lightly
  • What People Get Wrong
  • Where This Comes Back
Lesson 68.8 - Choosing an Approach as the Team Grows
  • The Situation
  • The Concept
    • Matching the approach to the team
    • Six teams, six libraries
    • The thing that matters more than the mechanism
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions
Module 69 - Running a Club Repository
Module Overview
  • Module Overview
Lesson 69.1 - From One Repo to a Club Organization
  • The Situation
  • The Concept
    • Why not personal accounts
    • Cost: free for a school
    • The model for SBCREW
  • What People Get Wrong
  • Where This Comes Back
Lesson 69.2 - Teams, Repositories, and the Season Cycle
  • The Situation
  • The Concept
    • Repositories per team
    • The season cycle
    • Who creates repositories
    • Each team's library stays its own
  • What People Get Wrong
  • Where This Comes Back
Lesson 69.3 - Permissions: Keeping Teams in Their Own Lane
  • The Situation
  • The Concept
    • Grant repositories to teams, not to individuals
    • Member role: Write, not Admin
    • Restrict repository creation
    • Require two-factor authentication
    • The result
  • What People Get Wrong
  • Where This Comes Back
Lesson 69.4 - When the Club Has More Than One Advisor
  • The Situation
  • The Concept
    • Have at least two owners
    • Advisors who are not owners
    • Owners are not on a team's roster
    • Recovery codes
  • What People Get Wrong
  • Where This Comes Back
Lesson 69.5 - Why a School Email Does Not Equal Access
  • The Situation
  • The Concept
    • What actually controls access
    • Why this matters for the club's rule
    • The three situations
  • What People Get Wrong
  • Where This Comes Back
Lesson 69.6 - Schools on Google Workspace
  • The Situation
  • The Concept
    • What Enterprise would unlock
    • The practical recommendation
  • What People Get Wrong
  • Where This Comes Back
Lesson 69.7 - Schools on Microsoft 365 and Entra ID
  • The Situation
  • The Concept
    • What Enterprise would unlock
    • The practical recommendation
  • What People Get Wrong
  • Where This Comes Back
Lesson 69.8 - Schools Running Their Own (or No) Identity System
  • The Situation
  • The Concept
    • This is completely workable
    • The one thing to get right
    • When to consider Enterprise anyway
  • What People Get Wrong
  • Where This Comes Back
Lesson 69.9 - Enterprise Integration: Automating Graduation Offboarding
  • The Situation
  • The Concept
    • SCIM: automatic deprovisioning
    • Enterprise Managed Users: the strongest form
    • When it is worth it
    • What it does not change
  • What People Get Wrong
  • Where This Comes Back
Lesson 69.10 - The Club's Annual Lifecycle
  • The Situation
  • The Concept
    • The end-of-season tasks
    • The start-of-season tasks
    • Onboarding new members
    • Offboarding graduates - the load-bearing step
    • The one-page club document
  • What People Get Wrong
  • Where This Comes Back
Module Project
  • Project Goal
  • Acceptance Criteria
  • Expected Symptoms When Things Go Wrong
  • Diagnosis Walk-Through
  • Code Checkpoint
  • Self-Check Questions