Unit 0 · Lesson 1

Installing WPILib & VS Code

Before your robot moves a single inch, your development environment has to be solid. This lesson gets you fully set up — and explains why each piece matters.

By the end of this lesson, you will:

  • Install the WPILib all-in-one suite on your operating system
  • Understand why FRC uses a dedicated VS Code — and why that matters at competition
  • Explain what WPILib is and where it fits in the full robot system
  • Navigate the WPILib install directory and identify what each folder does
  • Describe the chain from your Java code to a physical motor spinning

The Systems Picture

FRC robots are three systems working together. Your code only controls one of them — but it has to talk to all three. Understanding this triad is the foundation of everything in this course.

👇 Click each card to flip it and learn more
⚙️
Mechanical
tap to learn more
⚙️

Motors, gearboxes, chains, frames, arms, and intakes. Code cannot fix a broken gear — but it can protect mechanisms by limiting torque and velocity in software before hardware fails.

Electrical
tap to learn more

Battery, PDH/PDP, CAN bus, motor controllers, sensors, wiring. Every command you send travels this layer. Brownouts and CAN faults start here — your code has to account for that.

💻
Software
tap to learn more
💻

Java code, WPILib, vendor libraries, and the roboRIO. This is your layer — and where this course lives. But your code is only useful when the full chain works.

The Full Chain: From Keystrokes to Motors

Every line of code you write travels a longer path than you might expect. Click the button below to animate the chain.

Your Java Code  (VS Code on your laptop)
↓  gradle build
WPILib Runtime  (deployed to roboRIO)
↓  CAN bus
Motor Controllers  (TalonFX / SparkMax)
↓  wires → PWM
Motors  (brushless / brushed)
↓  shaft → gearbox
Mechanism  (drivetrain / arm / intake)

What Is WPILib?

WPILib (Worcester Polytechnic Institute Library) is the official Java library for FRC robot programming. It provides the robot loop framework, hardware abstraction classes, a bundled VS Code, the Gradle build system, simulation tools, and logging utilities — everything your team needs to go from blank file to deployed robot.

💡 Why a dedicated VS Code?

WPILib ships its own copy of VS Code because FRC requires a specific JDK version (JDK 17) and a configured Gradle wrapper. If you use your system VS Code and someone updates Java globally, your robot code breaks — potentially at the worst possible moment. The WPILib installer handles all of that for you, as long as you use it.

🔍 Event Observation

One of the most common causes of mysterious deploy failures at events: code built with the wrong Java version. The roboRIO runs a specific season image, and your Java version has to match it. The WPILib installer handles this automatically — don't go rogue with a system Java install.

Installation Guide

The WPILib installer is released every fall for the new season. Always use the latest stable release — never a prior year's installer. Download from the official GitHub repository:

https://github.com/wpilibsuite/allwpilib/releases

Find the release tagged Latest (not a pre-release) and download the file for your OS. Then follow the steps below.

  1. Download the ISO

    Look for a file named WPILib_Windows-XXXX.X.X.iso. It's a disk image — about 1.2 GB.

  2. Mount the ISO

    Right-click the file and select Mount. Windows will add it as a virtual drive in File Explorer.

  3. Run the installer

    Open the mounted drive and double-click WPILibInstaller.exe. When prompted, choose Install for this User.

  4. Wait for completion

    The installer downloads and configures VS Code, JDK 17, Gradle, and all FRC tools. This takes 3–10 minutes.

  5. Verify

    Look for a new shortcut called WPILib VS Code XXXX. Open it — you should see the WPILib icon (FRC logo) in the sidebar.

💡 ISO vs. regular installer?

The Windows installer is a disk image because it bundles a full JDK, VS Code, and all FRC tools in one package. You mount it like a USB drive, run the installer inside, then eject. Nothing gets installed to a temporary or unexpected location.

  1. Download the DMG

    Look for WPILib_macOS-XXXX.X.X.dmg on the releases page.

  2. Open the DMG

    Double-click the downloaded file. A window appears showing the WPILib installer app.

  3. Handle the security warning

    macOS may block the installer with "unverified developer." Go to System Settings → Privacy & Security and click Open Anyway. This is safe — WPILib is the official FRC tool.

  4. Run the installer

    The app will install VS Code, JDK 17, and the FRC tools into your user folder. Choose Install for this User.

  5. Verify

    Open Spotlight, type WPILib VS Code, and launch it. Check for the WPILib FRC logo icon in the Activity Bar on the left.

  1. Download the archive

    Look for WPILib_Linux-XXXX.X.X.tar.gz. Ubuntu 22.04 LTS is well-tested.

  2. Extract

    Open a terminal in your Downloads folder and run:

    tar -xzf WPILib_Linux-XXXX.X.X.tar.gz
  3. Make executable and run
    chmod +x WPILibInstaller
    ./WPILibInstaller
  4. Follow the prompts

    Select Install for this User. The installer sets up VS Code, JDK 17, and FRC tools in ~/wpilib/XXXX/.

  5. Verify

    Launch VS Code from ~/wpilib/XXXX/vscode/code and confirm the WPILib icon appears in the sidebar.

⚠️ Troubleshooting: "WPILib icon is missing"

If you don't see the WPILib extension sidebar icon, you probably launched your system VS Code instead of the WPILib VS Code. They look identical. Check your start menu or Applications folder for a shortcut labeled specifically WPILib VS Code XXXX. Create a desktop shortcut from the WPILib install directory so the two never get confused.

Exploring the WPILib Install Directory

When WPILib installs, it creates a home folder for all FRC tooling. On Windows this is typically C:\Users\Public\wpilib\XXXX\; on macOS/Linux it's ~/wpilib/XXXX/.

Click any folder below to learn what it does.

  ~/wpilib/2025/
📁jdk/
📁tools/
📁vscode/
📁maven/
← click a folder to inspect it
💡 The Offline Build Cache

Competition venues often have unreliable Wi-Fi — and Gradle normally tries to download dependencies from the internet when it builds. The maven/ folder is a pre-populated local cache that lets your build work with zero internet access. Do not delete it. Do not manually update it mid-season. It is there on purpose.

🔌 System Check

⚙️ Hardware & Environment Prerequisites

This lesson is laptop-only — no robot required yet. But verify these now so you're not surprised later.


Your laptop needs:

  • Windows 10/11, macOS 12+, or Ubuntu 22.04 LTS
  • At least 4 GB free disk space (8 GB recommended)
  • Stable internet for the ~1.2 GB download

When you get to a physical robot (upcoming lessons):

  • The roboRIO must be imaged with the current season's image — an outdated image will reject your deployment even if your code is perfect.
  • FRC Driver Station (Windows only) is a separate install from WPILib.
  • The roboRIO is powered by the PDH/PDP — it cannot boot from USB alone. If VS Code can't deploy, check your battery voltage and your tether cable before assuming it's a software problem.

The single most common inspection delay I see: a roboRIO running last year's image. The imaging tool is in your WPILib tools/ folder. It takes five minutes. Do it early — not in the pit at your first regional.

Knowledge Check

Click an answer to check your understanding. These questions mirror the systems thinking we'll use throughout the course.

Why does WPILib ship its own bundled copy of VS Code instead of using your system installation?
  • 1VS Code is not compatible with Java
  • 2FRC requires a specific JDK version and build config that the WPILib bundle handles automatically
  • 3The FRC extension is not available in the VS Code Marketplace
  • 4Regular VS Code cannot connect to Wi-Fi
At competition with no internet access, Gradle can still build your robot code because:
  • 1WPILib doesn't use the internet at all
  • 2Gradle skips dependency checks on competition day
  • 3WPILib pre-populates a local Maven dependency cache during installation
  • 4The roboRIO downloads dependencies itself
Your code deploys fine but the robot won't move. Which of these is a hardware/electrical thing to check before blaming your code?
  • 1Rewrite the motor control method
  • 2Reinstall WPILib
  • 3Check battery voltage, Driver Station enable state, and CAN bus connection to motor controllers
  • 4Switch from Java to Python
💪 Practice Prompt

Installation Verification Checklist

Complete each of these after installing WPILib. Write down your answers — you'll reference them in Lesson 2.

  1. Open WPILib VS Code. Click Help → About. What version of VS Code is it built on? What WPILib version is installed?
  2. Open a terminal inside WPILib VS Code (Terminal → New Terminal). Type java -version. What does it report?
  3. Navigate to the WPILib tools/ directory. Find three utilities there and write one sentence each about what you think they do.
  4. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) and type WPILib. List five commands that appear in the dropdown.
  5. Bonus: If you have access to a roboRIO, open the roboRIO Imaging Tool from the tools/ folder. What season image version does it want to install?