Software Programming Guide (2025 Updated)

Follow these steps to set up your FRC robot programming environment with the latest 2025 tools

🆕 What's New in 2025 FRC Software?

  • WPILib 2025.1.1 - Java 17 required, new units library, @Logged annotation for telemetry
  • Elastic Dashboard - NEW driver-focused dashboard contributed by FRC Team 353
  • Python Official Support - Python is now officially supported for FRC programming!
  • WPIcal AprilTag Tool - New field layout calibration tool for AprilTags
  • Vendor Dependency Manager - Discover and install vendor dependencies directly in VS Code
  • Persistent Alerts API - Display alerts on dashboards like Shuffleboard and Elastic
Step 1

SPARK MAX Firmware Update

Before programming your robot, you need to ensure all SPARK MAX motor controllers have the latest firmware.

Why Update Firmware?

  • Bug fixes and performance improvements
  • Compatibility with latest WPILib versions
  • New features and optimizations

Installation Steps:

  1. Download REV Hardware Client

    Visit the REV Robotics website and download the latest version of REV Hardware Client for Windows.

    REV Hardware Client Download
  2. Connect SPARK MAX via USB-C

    Connect your SPARK MAX to your computer using a USB-C cable. The device should appear in REV Hardware Client.

  3. Update Firmware

    In REV Hardware Client, select your SPARK MAX and click 'Update Firmware'. For 2025, use firmware version 25.0.1 or later.

  4. Factory Reset & Persist Parameters

    After updating to firmware 25.x for the first time, perform a Factory Reset, then click 'Persist Parameters'.

⚠️ Important Note

If you have SPARK MAXes on firmware 25.0.0, update them individually to 25.0.1 with robot power OFF to avoid CAN bus issues.

Step 2

CAN Device ID Configuration

Each device on the CAN bus must have a unique ID. By default, SPARK MAX controllers come with ID 0, which must be changed.

Setting Device IDs:

  1. Open REV Hardware Client

    Connect your SPARK MAX via USB-C as in Step 1.

  2. Change CAN ID

    In the 'Basic' tab, find the 'CAN ID' field. Set it to a unique number between 1-62. Common practice is to use sequential IDs (1, 2, 3...) for each motor controller.

  3. Label Your Devices

    Use a label maker or tape to physically mark each SPARK MAX with its assigned CAN ID. This makes troubleshooting much easier!

  4. Document Your IDs

    Create a spreadsheet or document listing which motor (left drive, right drive, intake, etc.) uses which CAN ID.

💡 Pro Tip

Organize your CAN IDs logically: 1-10 for drivetrain, 11-20 for manipulators, etc. This makes code more readable and maintenance easier.

Step 3

WPILib Installation

WPILib is the official software library for FRC. It includes everything you need to program your robot: VS Code, Java/C++ development tools, and robot utilities.

System Requirements:

  • Windows 10 or 11 (64-bit)
  • macOS 12 or later
  • Ubuntu 22.04 or 24.04 (64-bit)
  • At least 4GB RAM (8GB recommended)

Installation Steps:

  1. Download WPILib

    Go to the official WPILib releases page and download the latest installer for your operating system (WPILib 2025.3.2 or newer).

    WPILib Downloads
  2. Run the Installer

    Extract and run the installer. Choose 'Install for this User' and select a location (default is recommended).

  3. Download VS Code Extensions

    The installer will download WPILib VS Code (separate from any existing VS Code installation) and all necessary extensions.

  4. Launch WPILib VS Code

    After installation, launch 'WPILib VS Code 2025' (not regular VS Code). You should see the WPILib icon in the top right corner.

What Gets Installed?

  • Visual Studio Code with FRC extensions
  • Java JDK for robot development
  • WPILib libraries and tools
  • Simulation tools (Glass, SmartDashboard, Shuffleboard)
  • PathWeaver for autonomous path planning

📖 WPILib Documentation & Visual Guides

Complete installation guides with screenshots and step-by-step instructions:

Step 4

FRC Game Tools (Windows Only)

FRC Game Tools include the Driver Station and imaging tools needed to operate your robot. This is only required on Windows machines used to drive the robot.

Installation Steps:

  1. Download from National Instruments

    Visit the FIRST website to get the download link for FRC Game Tools. You'll need to create a free NI account.

    FRC Game Tools Guide
  2. Run the Installer

    Extract the downloaded files and run the setup. Install all components including Driver Station and roboRIO Imaging Tool.

  3. License Activation

    When prompted, activate with the free license key provided on the FIRST website using your team number.

🎮 What is Driver Station?

The FRC Driver Station is the software that communicates with your robot during matches. It handles joystick input, displays robot status, and manages enable/disable states.

Step 5

Creating Your First Robot Project

Now that everything is installed, let's create your first robot project using the Command-Based framework.

Creating a Project:

  1. Open WPILib VS Code

    Launch WPILib VS Code 2025 from your applications.

  2. Create New Project

    Press Ctrl+Shift+P (Cmd+Shift+P on Mac) and type 'WPILib: Create a new project'. Select it.

  3. Configure Project Settings
    • Select 'Template' → 'Java' → 'Command Robot'
    • Set your project folder location
    • Enter your team number (e.g., 9236)
    • Give your project a name (e.g., 'MyFirstRobot')
  4. Generate Project

    Click 'Generate Project'. VS Code will create the project structure and open it.

📁 Project Structure

Your project will have:

  • src/main/java/frc/robot/ - Your robot code
  • Robot.java - Main robot class
  • RobotContainer.java - Robot configuration
  • commands/ - Command classes folder
  • subsystems/ - Subsystem classes folder
Step 6

Basic Drive Programming

Let's create a simple drivetrain subsystem and command to control your robot with a joystick.

Creating a Drivetrain Subsystem:

  1. Create Drivetrain.java

    In the subsystems folder, create a new file called Drivetrain.java

  2. Add SPARK MAX Controllers

    Import REVLib and create SPARK MAX objects with the CAN IDs you configured in Step 2:

    import com.revrobotics.spark.SparkMax;
    import com.revrobotics.spark.SparkLowLevel.MotorType;
    
    private final SparkMax leftMotor = new SparkMax(1, MotorType.kBrushless);
    private final SparkMax rightMotor = new SparkMax(2, MotorType.kBrushless);
  3. Create Drive Method

    Add a method to control the motors:

    public void arcadeDrive(double speed, double rotation) {
        leftMotor.set(speed + rotation);
        rightMotor.set(speed - rotation);
    }
  4. Create Drive Command

    In RobotContainer.java, bind the joystick to drive the robot:

    drivetrain.setDefaultCommand(
        new RunCommand(
            () -> drivetrain.arcadeDrive(
                -controller.getLeftY(),
                controller.getRightX()
            ),
            drivetrain
        )
    );

🎯 Understanding Arcade Drive

Arcade drive uses one joystick axis for forward/backward speed and another for rotation. It's the most intuitive control scheme for beginners!

Step 7

Deploying Code to Robot

Now it's time to deploy your code to the actual robot!

Deployment Steps:

  1. Connect to Robot

    Connect your computer to the robot's radio/router via Ethernet or WiFi. The robot should be powered on.

  2. Build the Code

    Press Ctrl+Shift+P and select 'WPILib: Build Robot Code'. Make sure there are no errors.

  3. Deploy to Robot

    Press Ctrl+Shift+P and select 'WPILib: Deploy Robot Code'. The code will compile and upload to the roboRIO.

  4. Test with Driver Station

    Open FRC Driver Station, connect your joystick, enable the robot, and test your drive code!

⚠️ Safety First!

Always test your robot in a safe area with plenty of space. Make sure the robot is on blocks or the wheels are off the ground for initial testing!

🎉 Congratulations!

You've completed the basic software setup! You now have a working robot that can be driven with a joystick. From here, you can add more subsystems, autonomous commands, and advanced features.

Step 8

Debugging & Competition Day Survival (They Don't Teach This!)

These are the REAL problems rookie teams face at competition - and how to fix them FAST!

🚨 COMMON CODE PROBLEMS AT COMPETITION

  • ❌ Robot doesn't move = CHECK CAN IDs! Wrong motor IDs are #1 rookie mistake
  • ❌ "No Robot Communication" = Radio not configured with team number or wrong IP address
  • ❌ Robot randomly reboots = BROWNOUT! Battery not fully charged or too many motors drawing current
  • ❌ Motors run backward = Invert motor direction in code: motor.setInverted(true);
  • ❌ Autonomous doesn't work = Did you select autonomous mode in Driver Station?
  • ❌ Joystick not working = Check USB connection and Driver Station shows correct joystick
  • ❌ Code deploys but robot doesn't enable = Check for code errors in Driver Station console!

🔍 DEBUGGING TOOLS (USE THESE!)

  • 📊 SmartDashboard/Shuffleboard - Display motor speeds, sensor values, debug info in REAL-TIME
  • 🖥️ Driver Station Console - Shows code errors and print statements. READ THIS FIRST when debugging!
  • 💡 Add System.out.println() everywhere - Print variable values to find where code breaks
  • 🔌 REV Hardware Client - Check CAN device status, firmware, and see if robot sees your motors
  • 📸 Phoenix Tuner (CTRE) - For Talon SRX/FX debugging and configuration
  • 🎯 Driver Station Logs - Save logs after each match to analyze problems later!

💡 PRO TIP: Add a "debug mode" button to your dashboard to print extra info when troubleshooting!

🏆 COMPETITION DAY SOFTWARE TIPS (From Veteran Teams)

  • ⏰ ARRIVE EARLY - Get to pit 2 hours before matches to setup and test
  • 💾 DON'T change code at competition unless absolutely necessary - test changes at home!
  • 📱 Have Driver Station laptop FULLY CHARGED + bring power cable to every match
  • 🔄 Redeploy code before EVERY match - ensures latest code is on robot
  • 👥 Assign ONE person as "Driver Station Operator" - they manage laptop, enable robot, select auto
  • 📋 Print a "Pre-Match Checklist": Connect DS → Fresh battery → Redeploy → Test motors → Check auto selected
  • 🛑 DISABLE robot immediately if something goes wrong - don't let it run wild!
  • 💬 TALK TO OTHER TEAMS - FRC community is friendly! Ask veteran teams for help debugging
  • 📸 Take notes after each match - what worked, what didn't, what to fix
  • 🏅 Stay ORGANIZED - tools labeled, wires neat, code documented. Judges notice this!

⚡ REMEMBER: Simple, working robot > Complex, broken robot. Functionality beats fancy features!

🎓 FINAL ADVICE FOR ROOKIE PROGRAMMERS

  • ✅ Start SIMPLE - get drivetrain working first, then add features one at a time
  • ✅ TEST EARLY, TEST OFTEN - don't wait until week 6 to test your code!
  • ✅ VERSION CONTROL - Use Git to save your code. You'll thank yourself later!
  • ✅ COMMENT YOUR CODE - Future you will have no idea what past you was thinking
  • ✅ Learn from MISTAKES - Every bug is a learning opportunity. Write down solutions!

Additional Resources