Hi, I’m a programmer for team 2634
and we’re having some MAJOR problems with the robot. The code builds, deploys, and runs fine, but nothing on the robot seems to respond. For example if push a button that is supposed to make a motor run the motor will not run, but if I put a print command the word is printed with no issues.
The victors are blinking orange. Under all the imported files it says “Javadoc not found” This happens even If I manually locate the file.
I have checkd all the wiring and the pwms multiple times. Everything mechanical and electrical on the robot is 100% correct from what I can tell. My code is below
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Servo;
import edu .wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Victor;
/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the SimpleRobot
* documentation. If you change the name of this class or the package after
* creating this project, you must also update the manifest file in the resource
* directory.
*/
public class RobotTemplate extends SimpleRobot {
public Joystick stick = new Joystick(1);
public Servo flag = new Servo(3);
public Victor armX = new Victor(1);
public Victor armY = new Victor(2);
public DigitalInput switch1 = new DigitalInput(1);
/**
* This function is called once each time the robot enters autonomous mode.
*/
public void autonomous() {
}
/*
* This function is called once each time the robot enters operator control.
*/
public void operatorControl() {
double stickX = stick.getX();
armX.setPosition(stickX*0.25);
double throttle = stick.getThrottle();
if(stick.getRawButton(3)){
armY.set(stickX/throttle);
System.out.println("Button 3 pressed");
}
if(switch1.get()){
armX.set(0.2);
Timer.delay(0.2);
armX.set(0.0);
}
}
public void test() {
}
}