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.
- Every download on Prerequisites, done before the first hardware lesson.
- A mechanism to run. Mechanism CAD has models for two.
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.
- WPILib 2027 alpha
- Commands v3 and OpModes. Each robot mode is its own class, and each mechanism hands out the commands that drive it.
- Java 25
- Packages start with
org.wpilib. An example that saysedu.wpi.firstwas written for an older year. - SystemCore
- The board your code deploys to. Setup instructions written for a roboRIO do not apply.
- Phoenix 6 alpha
- CTRE's library, and the only vendor library in the course. It drives every motor and sensor you touch.
Old tutorials won't work
Almost every FRC tutorial you find by searching was written for Commands v2. Those pages open a file calledRobotContainer, 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.
- A mechanism on a bench, powered, with a clear path to swing.
- A laptop you are allowed to install software on, and a mentor who can approve it if you are not.
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.