Welp, it's nearing that time of year yet again and sadly, we have lost our Java programmer. We have yet to get any response out of our robot outside of the hello world program. Would someone verify if the following code (pulled from the generic tutorial) should work?
Code:
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Timer;
public class GroundZeroTemplate extends SimpleRobot {
RobotDrive drive = new RobotDrive(1,3,2,4);
Joystick leftStick = new Joystick(1);
Joystick rightStick = new Joystick(2);
/**
* This function is called once each time the robot enters autonomous mode.
*/
public void autonomous() {
/*getWatchdog().setEnabled(true);
getWatchdog().setExpiration(0.5);
drive.drive(1,0);
Timer.delay(2);
drive.drive(0,0);*/
for (int i = 0; i < 4; i++) {
drive.drive(0.5, 0.0); // drive 50% fwd 0% turn
Timer.delay(2.0); // wait 2 seconds
drive.drive(0.0, 0.75); // drive 0% fwd 0% turn
}
}
/**
* This function is called once each time the robot enters operator control.
*/
public void operatorControl() {
while (true && isOperatorControl() && isEnabled()) // loop until change
{
drive.tankDrive(leftStick, rightStick); // drive w/ joysticks
Timer.delay(0.005);
}
}
}
The only unique aspect of our setup is that we are using 4 motors connected to 4 jaguars in our setup instead of the default 2.
When we activate this code in both autonomous as well as user-driven modes, we get no visual response from the jaguars whatsoever nor any movement. Should I look at something in this code or do I need to start looking at electrical problems?
Thank you!