Talon Programming

Unfortunately, we (Programmers) were asked to program the new Talons, we are new to java so we have no clue what we should manually program into our robot to work. Its been giving us issues so if you could teach me how to create a tank drive program. id be SUPER thankful :slight_smile:

It’s no different than using Victors or PWM Jaguars in code, just a different keyword.


        Talon frontLeftMotor = new Talon(1);
        Talon rearLeftMotor = new Talon(2);
        Talon frontRightMotor = new Talon(3);
        Talon rearRightMotor = new Talon(4);

        drive = new RobotDrive(frontLeftMotor, rearLeftMotor,
                frontRightMotor, rearRightMotor);

Thanks you so much but for some reason it still wont move the robot, it gives recongition that its being called but no movement is there a way to set up how the axis of each joystick vary is what the speed controller should be set for. or something along the lines.?

You have to call the drive() method with a Joystick object as the parameter in the operatorControl() method.