We managed to get that issue solved. We had to turn off the console out dip switch. However, we seem to have run into another problem. No matter what, we cannot seem to get the robot to drive.
Here is our code. We have tried
Code:
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Watchdog;
import edu.wpi.first.wpilibj.SpeedController;
import edu.wpi.first.wpilibj.Jaguar;
public class RobotTemplate extends IterativeRobot {
RobotDrive robot;
Joystick left;
Joystick right;
public void robotInit() {
robot = new RobotDrive(1,2,3,4);
left = new Joystick(1);
right = new Joystick(2);
System.out.println("RobotInit() completed.");
}
public void autonomousPeriodic() {
}
public void teleopPeriodic() {
//robot.tankDrive(left.getThrottle(),(-1*right.getThrottle()));
//robot.tankDrive(leftFront.get(), rightFront.get());
robot.tankDrive(2,2);
//System.out.println("left:"+left.getThrottle());
//System.out.println("right:"+right.getThrottle());
//System.out.println("LMAG:"+ left.getMagnitude());
//System.out.println("RMAG:"+ right.getMagnitude());
}
}
The getThrotle() methods never output anything except for 0. Is this normal?
The getMagnitude() methods do change when we move the joysticks.
What really worries me is that the robot does not move even when I manually enter values into the tankDrive() method. Does this mean that something is wrong with our wiring?
Also, we did use jaguars. We connected the 4 jaguard to the sidecar using the PWM cables. We connected the male ends to the servo ports on the jaguars, and the female ends to the 3 pin PWM out ports on the sidecar.
I attached images of how we wired the jaguars. Is this correct?
Thanks