Thrifty Nova
  • Software Resources
    • Getting Started
    • Configure Controller Settings
      • Factory Default
      • Motor Type - Minion Setting
      • Inverting the Motor
      • Brake Mode
      • Maximum Output
      • Ramp Up/Ramp Down
      • Current Limiting
      • Soft Limits
      • Hard Limits
      • Setting Encoder Position
      • Follower Mode
    • Configure Onboard PID
    • Configure CAN Frequency
    • IO Signal Management
    • Set Output
    • Logging
    • Get Feedback
    • Unit Conversions
    • Subsystem Examples
      • Simple Elevator Example
      • Swerve Module Example
      • Simple Arm Example
  • Electrical Resources
    • Wiring the Thrifty Nova
    • LED Color Codes
    • Brushless Hall Sensor Connector
    • USB Communications
    • 10 Pin Data Connector
      • Intro to Sensors
      • Sensor Hat
      • Motor Runner Board
    • Hard Reset
  • Mechanical
    • Mounting Options
  • Software Releases
    • Software Releases
  • Thrifty Config
    • Thrifty Config Demo Video
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Software Resources
  2. Configure Controller Settings

Follower Mode

The Thrifty Nova supports follower mode, allowing one motor controller to mirror the behavior of another. This is useful for mechanisms that need multiple synchronized motors, like a drive train or elevator.

Basic Usage

To make a motor follow another:

// Create two motor controllers
ThriftyNova leader = new ThriftyNova(1);    // CAN ID 1
ThriftyNova follower = new ThriftyNova(2);  // CAN ID 2

// Make motor 2 follow motor 1
follower.follow(1);  // Pass the CAN ID of the leader

Configuration Example

Followers can be configured like any other motor. Here's a typical setup for a drive train:

ThriftyNova leftLeader = new ThriftyNova(1)
    .setBrakeMode(true)
    .setMaxOutput(1.0);

ThriftyNova leftFollower = new ThriftyNova(2)
    .setBrakeMode(true)          // Match leader's brake mode
    .setMaxOutput(1.0)           // Match leader's max output
    .setInverted(false)          // Match leader's inversion
    .follow(leftLeader.getDeviceID());  // Follow left leader

Important Notes

  • The follower will mirror whatever control mode the leader is using (percent output, position, velocity)

  • Follower updates depend on the fault status frame rate - slower rates mean slower follower updates

  • A motor can only follow one leader at a time

  • If you call other control methods (like setPercent()) on a follower, it will stop following

Error Handling

Like other configurations, you can check if setting up follower mode failed:

if (motor.hasError(Error.SET_FOLLOWER_ID)) {
    System.out.println("Failed to set up follower mode!");
}
PreviousSetting Encoder PositionNextConfigure Onboard PID

Last updated 6 months ago

Was this helpful?