Yes using the PWMTalonSRX class
Using the Y cable to connect to ports 0 and 1 respectively.
Currently testing the example code from VS code using tank drive.
/*----------------------------------------------------------------------------*/
/* Copyright © 2017-2018 FIRST. All Rights Reserved. /
/ Open Source Software - may be modified and shared by FRC teams. The code /
/ must be accompanied by the FIRST BSD license file in the root directory of /
/ the project. /
/----------------------------------------------------------------------------*/
package frc.robot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.PWMTalonSRX;
import edu.wpi.first.wpilibj.TimedRobot;
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
/**
- This is a demo program showing the use of the RobotDrive class, specifically
- it contains the code necessary to operate a robot with tank drive.
*/
public class Robot extends TimedRobot {
private DifferentialDrive m_myRobot;
private Joystick m_leftStick;
private Joystick m_rightStick;
@Override
public void robotInit() {
m_myRobot = new DifferentialDrive(new PWMTalonSRX(0), new PWMTalonSRX(1));
m_leftStick = new Joystick(0);
m_rightStick = new Joystick(0);
}
@Override
public void teleopPeriodic() {
m_myRobot.tankDrive(m_leftStick.getY(), m_rightStick.getY());
}
}

