Your program extends the SimpleRobot class. When you create a program using this as your base class, your operatorControl() method is called exactly one time during the match. So, you want to place the code you want to run inside a while loop. For example in the following, I renamed your method to "checkUserInputs()" and updated the operatorControl() method to call your method continuously while the robot is enabled and in the teleop period:
Code:
/*
* This function checks for and reacts to user inputs.
*/
public void checkUserInputs() {
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);
}
}
/*
* This function is called once each time the robot enters operator control.
*/
public void operatorControl() {
while (isOperatorControl() && isEnabled()) {
checkUserInputs();
}
}