[RobotBuilder / Java] Multiple Talon SRX's

Say you have 7 Talons. 4 connected to the 4 motors controlling the 4 wheels. In RobotBuilder, would you use 4 of the SRX actuators for each of the Talons in a Speed Controller Group? Or do you just need one for all 4 actual Talons?

are the 4 motors part of a drive?

If I understand you correctly, yes, these motors are part of drive. 2 for the front and back left drive and 2 for the front and back right drive.

Put both left motors into a speed controller group and both right motors into a speed controller group. Then put both speed controller groups into a differential drive.

Alright, so by “motors” you mean the speed controllers -talons-. Right? I think I understand the general functions, but I really am only a programmer, so I have to study everything else.

Yes the Talons are the speed controllers; you need to put them in a group because of the DifferentialDrive which takes the two sides of the robots as single parameters in its constructor.

With Talons you can just set one of left side and one of the right side motors as a master, and set the other left side and other right side to be followers.

In pseudo-code:
TalonSRX front_left_talon = new TalonSRX( <talon id> )
TalonSRX front_right_talon = new TalonSRX( <talon id> )

TalonSRX back_left_talon = new TalonSRX( <talon id> )
back_left_talon.set(ControlMode.Follower, <talon id>) // front left’s talon id

TalonSRX back_right_talon = new TalonSRX( <talon id> )
back_rightt_talon.set(ControlMode.Follower, <talon id>) // front right’s talon id

Then just use the masters (front_right and front_left) as your objects that get passed to your DifferentialDrive constructor.

or


TalonSRX back_left_talon = new TalonSRX( <talon id> )
back_left_talon.follow(front_left_talon);