Using Phoenix outside of FRC#

Important

Users in FRC can skip this article.

Phoenix 6 is fully supported outside of FRC on supported Linux systems with a USB to CAN adapter.

Note

CANivore is the recommended USB to CAN adapter with support for CAN FD, name specification, and Windows (as host).

Installation#

API Installation#

Installation instructions can be found in Installing Phoenix 6. The instructions on this site can be utilized for both FRC and non-FRC.

Firmware Installation#

Device firmware upgrading is handled by the Phoenix Tuner X configuration client.

Enabling Devices#

When utilizing the TalonFX motor controller, the user must continuously feed an enable signal to the device. The device will disable if the enable signal has not been fed within the specified timeout period.

Note

It’s recommended for feedEnable() to be called synchronously with your motor update loop. The timeout should be larger than than the update loop rate.

// enable the motor controller for the next 100ms
Unmanaged.feedEnable(100);
// enable the motor controller for the next 100ms
ctre::phoenix::unmanaged::FeedEnable(100);
from phoenix6 import unmanaged

// enable the motor controller for the next 100ms
unmanaged.feed_enable(100)
// enable the motor controller for the next 100ms
UnmanagedNative.FeedEnable(0.100);

Examples#

The same Phoenix 6 examples can be used as a reference outside of FRC. The function calls are identical, although the framework that is used to call them may be different and specialized for FRC.

Non FRC Projects#

We recommend that users use the standard language projects to use our library outside of FRC. For example, a typical Python project will have a main.py that utilizes the phoenix6 library that’s installed with pip.

A typical C# project is a Visual Studio project that includes our libraries via nuget.

For C++, an example utilizing CMake is provided here.

Alternative Support#

In the event that the Phoenix 6 API does not fit the user’s needs (e.g. utilizing devices such as a TalonSRX). Users can utilize the Phoenix 5 API.

We also provide a hardware robot controller called the HERO development board. The HERO can be programmed in C# to utilize compatible v5 devices.