API Usage#
This section serves to provide basic API usage for the Phoenix 6 API. For full details, please visit the API docs (Java, C++).
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:
- 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 open and closed loop functionality of actuators such as the TalonFX.
- Status Signals
Details using status signals to retrieve sensor data from devices.
- 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.
- Swerve Overview
Documentation on the swerve API.