View Single Post
  #11   Spotlight this post!  
Unread 06-02-2017, 13:03
Waz Waz is offline
Strategy and programming mentor
AKA: Steve
FRC #2357 (System Meltdown)
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2009
Location: Raymore, MO
Posts: 20
Waz is an unknown quantity at this point
Re: Java Arcade with 3 CIM Gearbox

See section 9.1 here (http://www.ctr-electronics.com/downl...%20Manual.pdf).

It has the Java code to set up one follower/slave for a master Talon SRX. It is essentially this:
Code:
slaveMotor1.changeControlMode(CANTalon.ControlMode.Follower);
slaveMotor1.set(masterMotor.getDeviceID())
You will just need to set it up for two slaves on each side following the same master.
Code:
slaveMotor2.changeControlMode(CANTalon.ControlMode.Follower);
slaveMotor2.set(masterMotor.getDeviceID())
Then, just use your two masters (one left and one right) to create your RobotDrive object (it has a constructor that just takes one left and one right motor) and you have it.

I hope this helps,
Steve
Reply With Quote