General API Usage

This section serves to provide general API usage for the Phoenix 6 API. For full details, please visit the API docs (Java, C++, Python).

Important

While Phoenix 6 and Phoenix 5 devices may exist on the same CAN bus and same robot project, each robot project must use the API tied to the device firmware version. This means Phoenix 5 devices must use the Phoenix 5 API, and Phoenix 6 devices must use the Phoenix 6 API.

There are three major components to the Phoenix 6 API:

Configs

Configs represent a persistent configuration for a device. For example, closed-loop gains.

Configuration
Control Requests

Control Requests represent the output of a device, typically a motor controller.

Control Requests
Signals

Signals represent data retrieved from a device. This can be velocity, position, yaw, pitch, roll, temperature, etc.

Status Signals
TalonFX Quickstart

Quickstart on controlling a TalonFX with open loop control requests and a Joystick.

Open-Loop Control
  • API Overview
    • Details a high level overview of what makes up the Phoenix 6 API.

  • Configuration
    • Describes configuring device configs via code.

  • Control Requests
    • Highlights using control requests to control the output of actuators such as the TalonFX.

  • Status Signals
    • Details using status signals to retrieve sensor data from devices.

  • Signal Logging
    • Information on the signal logging API used for capturing signal traffic on the bus.

  • Device Faults
    • Documents how faults are used to indicate device hardware status.

  • Enabling Actuators
    • Information on the FRC Lock safety feature and enabling actuators.

  • Actuator Limits
    • Documents how to retrieve and configure software and hardware actuator limits.

  • Orchestra
    • Information on playing music and sounds using the Orchestra API.