Skip to content

CrossTheRoadElec/Phoenix6-Examples

Repository files navigation

Phoenix6-Examples

This repository contains examples of robot code utilizing WPILib and the Phoenix 6 API. A list of the following examples is shown below:

Basic API Examples

  • CANcoder
    • Demonstrates basic functionality of a CANcoder
  • Pigeon2
    • Demonstrates basic functionality of a Pigeon 2.0

Usage Examples

  • ArcadeDrive
    • Arcade drive using WPILib timed based
  • CommandBasedDrive
    • Arcade drive using WPILib command based
  • PositionClosedLoop
    • Demonstrates using the TalonFX closed loop position functionality
  • VelocityClosedLoop
    • Demonstrates using the TalonFX closed loop velocity functionality
  • LatencyCompensation
    • Demonstrates how to use the latency compensation API

Simulation Specific Examples

  • Simulation
    • Highlights a 4 TalonFX drivetrain driven in simulation

Application specific examples

  • SwerveWithPathPlanner (Java only)
    • Provides a basic example with the Phoenix6 Swerve API integrated with PathPlanner's path following for autonomous movement.