Gray Matter
WorkshopWorkshop Overview
WPILib 2027 is still in alpha: these pages change as the APIs settle.
LESSON 01

Workshop Overview

This site is the written version of Team 5712's programming workshop. It starts with one motor on a bench and ends with a swerve drive that finds its own way to a target. Every lesson runs on real CTRE hardware.

4 minutes
You’ll need

Nothing here assumes you have written code before. It does assume a mechanism is sitting in front of you, and that someone nearby can cut power to it.

Team 5712, Hemlock's Gray Matter, wrote this workshop and still teaches it in a room. These pages are the same material in the same order, so a team can work through it without us.

Required hardware

There is no software-only path through this workshop. Later lessons talk about running your code in "hardware simulation," and the phrase misleads people. Your laptop stands in for the robot controller. The motors are real, the CAN bus is real, and the arm on the bench is the arm that moves.

Each lesson clearly states which hardware it uses: Kraken, TalonFX, CANcoder, CANivore, and Phoenix 6. This workshop is written for those exact devices, and there are no alternative instructions for other motor controllers. Everyone works with the same hardware, building the same mechanism. If you have different hardware in your shop, you can still learn the concepts, but the code examples will not work out of the box.

The 2027 stack

For the 2027 season, WPILib introduced Commands v3, a new programming style which changes how you write code. We're going over Commands v3 in this workshop, not the old system.

Library
WPILib 2027 alpha
Commands v3 and OpModes. Each robot mode is its own class, and each mechanism hands out the commands that drive it.
Language
Java 25
Packages start with org.wpilib. An example that says edu.wpi.first was written for an older year.
Controller
SystemCore
The board your code deploys to. Setup instructions written for a roboRIO do not apply.
Vendor
Phoenix 6 alpha
CTRE's library, and the only vendor library in the course. It drives every motor and sensor you touch.
Watch out

Old tutorials won't work

Almost every FRC tutorial you find by searching was written for Commands v2. Those pages open a file called RobotContainer, import edu.wpi.first packages, and pick autonomous routines from a dashboard dropdown. None of that exists here. When an answer from the internet does not match your screen, that is usually the reason.

The road ahead

Read the pages in order. Each workshop assumes the hardware or the code from the one before it. The arrows at the bottom of every page walk that list for you.

Check your work

You won't be running any code on this page, but you will need to gather a few things before moving forward. Make sure you have everything in the list below. Missing even one causes trouble later in the workshop.

  1. A mechanism on a bench, powered, with a clear path to swing.
  2. A laptop you are allowed to install software on, and a mentor who can approve it if you are not.
Check

You are ready when

Both lines above are true, and the hardware is in front of you rather than on a purchase order. Nothing on that list gets easier to find later in the course.

Next is Prerequisites, which is every download and account you need before the hardware gets plugged in.