Only thing that jumped out at me is you're instantiating both xbox controller and Joystick on port 1. That doesn't seem right, but likely won't lead to the problem.
Try commenting all but the drivetrain and incrementally adding in items
i.e. start with:
Code:
package org.usfirst.frc.team5676.robot;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import org.usfirst.frc.team5676.robot.XboxController;
import edu.wpi.first.wpilibj.Compressor;
import org.usfirst.frc.team5676.robot.XboxController.Axis;
import org.usfirst.frc.team5676.robot.XboxController.buttons;
import org.usfirst.frc.team5676.robot.XboxController.triggers;
public class Robot extends IterativeRobot {
RobotDrive myDrive;
Joystick driveStick;
//static XboxController gameStick = new XboxController(1);
//DoubleSolenoid Piston;
//static Axis LeftStick=Global.driver.LeftStick;
//static Axis RightStick=Global.driver.RightStick;
//static triggers Triggers = Global.driver.Triggers;
//static buttons DriverButtons = Global.driver.Buttons;
//static buttons OperatorButtons = Global.operator.Buttons;
//static int OperatorDpad = -1;
public void robotInit() {
myDrive = new RobotDrive (1, 2, 3, 4);
driveStick = new Joystick(1);
}
public void autonomousPeriodic() {
}
public void operatorControl() {
while (isOperatorControl() && isEnabled()) {
myDrive.arcadeDrive(driveStick);
Timer.delay(0.01);
}
}
public void teleopPeriodic() {
}
/*
public void moveArm()
{ Piston = new DoubleSolenoid(0,1 );
if(gameStick.button[0].get() == true) {
Piston.set(DoubleSolenoid.Value.kForward);
System.out.println("'A' button is pressed: Piston moves forward");
}
else if(gameStick.button[1].get() ==true)
{
Piston.set(DoubleSolenoid.Value.kReverse);
System.out.println("'B' button is pressed: Piston moves backward");
}
else
{
Piston.set(DoubleSolenoid.Value.kOff);
}
}
public void FrontArm()
{ Piston = new DoubleSolenoid(2,3 );
if(gameStick.button[2].get() == true) {
Piston.set(DoubleSolenoid.Value.kForward);
System.out.println("'X' button is pressed: Piston moves forward");
}
else if(gameStick.button[3].get() ==true)
{
Piston.set(DoubleSolenoid.Value.kReverse);
System.out.println("'Y' button is pressed: Piston moves backward");
}
else
{
Piston.set(DoubleSolenoid.Value.kOff);
}
}
public void pickerArm()
{ Piston = new DoubleSolenoid(4,5 );
if(gameStick.button[4].get() == true) {
Piston.set(DoubleSolenoid.Value.kForward);
System.out.println("LB' button is pressed: Piston moves forward");
}
else if(gameStick.button[5].get() ==true)
{
Piston.set(DoubleSolenoid.Value.kReverse);
System.out.println("'RB' button is pressed: Piston moves backward");
}
else
{
Piston.set(DoubleSolenoid.Value.kOff);
}
}
*/
public void testPeriodic() {
}
}
Hmm... as I was making suggested comments, I noticed that you are using iterative Robot, but relying on operatorControl() to actually drive. I'm not sure if/how operatorControl() is used in IterativeRobot. Normally one would put that code in teleopPeriodic and not implement operatorControl()
Code:
/*
public void operatorControl() {
while (isOperatorControl() && isEnabled()) {
myDrive.arcadeDrive(driveStick);
Timer.delay(0.01);
}
}
*/
public void teleopPeriodic() {
myDrive.arcadeDrive(driveStick);
}