View Single Post
  #7   Spotlight this post!  
Unread 03-02-2017, 12:29
Coach Seb's Avatar
Coach Seb Coach Seb is online now
Registered User
AKA: Sebastien Cournoyer
FRC #5860 (Full Metal Muskrats)
Team Role: Coach
 
Join Date: Sep 2015
Rookie Year: 2015
Location: Algonac, MI
Posts: 122
Coach Seb is an unknown quantity at this point
Re: Java Arcade with 3 CIM Gearbox

so here is what i did.... Hopefully this make sense...

in my RobotMap.java....

Code:
public class RobotMap {
		
	public static CANTalon _frontLeftMotor = new CANTalon(11);  /* device IDs here (1 of 2) */		
	public static CANTalon _rearLeftMotor = new CANTalon(13);
	public static CANTalon _frontRightMotor = new CANTalon(14);
	public static CANTalon _rearRightMotor = new CANTalon(15);

	/* extra talons for six motor drives */
	public static CANTalon _leftSlave = new CANTalon(16);
	public static CANTalon _rightSlave = new CANTalon(17);
then in my DriveTrain_Subsystem class

Code:
private RobotDrive MainDrive = new RobotDrive(RobotMap._frontLeftMotor, RobotMap._rearLeftMotor, RobotMap._frontRightMotor, RobotMap._rearRightMotor);
I added the joystick line in my OI.java class

Code:
	Joystick _joy = new Joystick(0);
and finally, added the following to my Robot.java class... unfortunately it will not resolved the DriverJoystick .....

Code:
	public void teleopPeriodic() {
		Scheduler.getInstance().run();
		
    	double forward = DriverJoystick.getRawAxis(1); // logitech gampad left X, positive is forward
    	double turn = DriverJoystick.getRawAxis(2); //logitech gampad right X, positive means turn right
    	DriverJoystick.arcadeDrive(forward, turn);
	}
Any help would be appreciated... i think once i resolve how ot properly use the Talon SRX CAN then i can keep going... until then i am kinda stuck...
Reply With Quote