Closed Team4681 closed 5 years ago
Java
import edu.wpi.first.wpilibj.DigitalInput; import edu.wpi.first.wpilibj.SampleRobot; import edu.wpi.first.wpilibj.Timer;
public class RobotTemplate extends SampleRobot {
DigitalInput limitSwitch; public void robotInit() { limitSwitch = new DigitalInput(1); } public void operatorControl() { // more code here while (limitSwitch.get()) { //whatever you want to happen } }
}
added and working
Java
import edu.wpi.first.wpilibj.DigitalInput; import edu.wpi.first.wpilibj.SampleRobot; import edu.wpi.first.wpilibj.Timer;
public class RobotTemplate extends SampleRobot {
}