So, you have used code that was like this, with Jaguar types instead of SpeedControllers?
Code:
public class TestBot extends SimpleRobot {
private Joystick gamepad1, gamepad2, gamepad3, gamepad4; // These need to be initialized as joysticks, not gamepads.
private UserMessages uM;
private Jaguar leftJag, rightJag;
private Jaguar shooterFeeder, shooter, grabber, arm;
private Relay angler;
private RobotDrive drive;
public void robotInit() {
uM = new UserMessages();
rightJag = new Jaguar(1);
leftJag = new Jaguar(2);
shooterFeeder = new Jaguar(3);
shooter = new Jaguar(4);
arm = new Jaguar(5);
grabber = new Jaguar(6);
drive = new RobotDrive(2, 1); // Constructor wants PWM channels.
angler = new Relay(1);
gamepad1 = new Joystick(1); // These need to be initialized as joysticks, not gamepads.
gamepad2 = new Joystick(2);
gamepad3 = new Joystick(3);
gamepad4 = new Joystick(4);
Watchdog.getInstance();
System.out.println("[robot] Robot Ready!\n");
}
public void autonomous() {
System.out.println("[mode] Autonomous started");
uM.write(1, "Autonomous Mode");
while (isAutonomous() && isEnabled()) {
getWatchdog().feed();
Timer.delay(0.005);
}
System.out.println("[mode] Autonomous stopped");
}
public void operatorControl() {
System.out.println("[mode] Tele-op started");
uM.write(1, "Tele-op Mode");
while (isOperatorControl() && isEnabled()) {
getWatchdog().feed();
drive.tankDrive(gamepad1.getAxis(2), gamepad1.getAxis(5));
grabber.set(gamepad1.getAxis(3));
shooter.set(gamepad2.getAxis(2));
shooterFeeder.set(gamepad2.getAxis(5));
if(gamepad1.getButton(3) || gamepad1.getButton(3)) {
angler.set(Relay.Value.kForward);
}
else if(gamepad1.getButton(4) || gamepad1.getButton(4)) {
angler.set(Relay.Value.kReverse);
}
else {
angler.set(Relay.Value.kOff);
}
Timer.delay(0.005);
}
System.out.println("[mode] Tele-op stopped");
}
}
I fixed several things in your code. It 'should' work now, providing the wiring is correct. I don't normally like writing code for people, so I please ask that you read up on java, and use the provided API to make sure you aren't calling classes that don't exist. I have added comments on the above code for things that I have edited. If you need help on coding, you can PM me as well.
Let me know how the above code works.