Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Holden9607/FRC-Academy/llms.txt

Use this file to discover all available pages before exploring further.

CTRE Phoenix 6 is the vendor library for Kraken x60 and Falcon 500 motors. FRC Academy’s Kraken lessons use TalonFX, DutyCycleOut, and Follower from this library to demonstrate the Phoenix 6 control request model — where motor outputs are sent as typed request objects rather than raw numeric calls, giving you a precise and extensible command pipeline from the start.

com.ctre.phoenix6.hardware.*

TalonFX

Full class: com.ctre.phoenix6.hardware.TalonFX The primary motor controller class for CTRE Kraken x60 and Falcon 500 motors. Unlike simpler motor APIs, TalonFX uses a control-request pattern: you construct a request object (like DutyCycleOut) and pass it to setControl(), which lets you swap control modes at runtime without re-wiring your code. Constructor
new TalonFX(int deviceID, String canbus)
ParameterTypeDescription
deviceIDintCAN ID of the TalonFX controller (e.g. 1)
canbusStringCAN bus name — use your CANivore’s name (e.g. "DINO") or "" for roboRIO CAN
Key Methods
MethodReturnsDescription
setControl(ControlRequest request)voidSends a typed control request (e.g. DutyCycleOut, Follower) to the controller
getDeviceID()intReturns the CAN ID of this TalonFX
setNeutralMode(NeutralModeValue mode)voidSets brake or coast behavior when output is zero
Example
import com.ctre.phoenix6.hardware.TalonFX;
import com.ctre.phoenix6.controls.DutyCycleOut;

private final TalonFX m_motor = new TalonFX(1, "DINO");
m_motor.setControl(new DutyCycleOut(0.5)); // 50% forward

com.ctre.phoenix6.controls.*

DutyCycleOut

Full class: com.ctre.phoenix6.controls.DutyCycleOut A direct output control request that sets a TalonFX’s output as a simple duty-cycle percentage. This is the most straightforward control mode and the one used throughout FRC Academy’s introductory Kraken lessons. Constructor
new DutyCycleOut(double output)
ParameterTypeDescription
outputdoubleDuty cycle value: -1.0 = full reverse, 0.0 = stop, 1.0 = full forward
Usage Pattern in FRC Academy Bind motor output to a controller button using the command-based trigger API:
// While button is held: run at 50% — stop when released
operatorController.b()
    .whileTrue(new RunCommand(() -> m_motor.setControl(new DutyCycleOut(0.5))))
    .onFalse(new RunCommand(() -> m_motor.setControl(new DutyCycleOut(0.0))));

Follower

Full class: com.ctre.phoenix6.controls.Follower A control request that causes one TalonFX to continuously mirror another TalonFX (the master/leader). Once set, the follower automatically tracks the leader’s output — you only need to command the leader motor in your teleop code. Constructor
new Follower(int masterID, boolean opposeLeaderDirection)
ParameterTypeDescription
masterIDintThe device ID of the leader TalonFX to mirror
opposeLeaderDirectionbooleantrue if the follower should spin opposite to the leader (e.g. physically reversed motor)
4-Motor Tank Drive Example In FRC Academy’s 4-motor Kraken lesson, each follower mirrors its side’s lead motor. Right-side inversion is handled separately via MotorOutputConfigs, so both followers use false for opposeLeaderDirection:
// Each follower strictly mirrors its side's lead motor
m_leftFollow.setControl(new Follower(m_leftLead.getDeviceID(), false));
m_rightFollow.setControl(new Follower(m_rightLead.getDeviceID(), false));
CTRE Phoenix 6 is distributed via Phoenix Tuner X and may require a license for some advanced features such as Pro-tier closed-loop modes. The basic motor control API used in FRC Academy lessons — TalonFX, DutyCycleOut, and Follower — is available to all teams at no cost.
The bus name "DINO" is specific to FRC Team 9607’s CANivore. Replace it with your own team’s CANivore name, or use an empty string "" to target the default roboRIO CAN bus.

REV Robotics

SparkMax, SparkMaxConfig, and MotorType for SPARK MAX and NEO brushless motors.

Kraken Motor Guide

Wiring, CAN configuration, and FRC Academy lesson walkthrough for Kraken x60 motors.

Build docs developers (and LLMs) love