What 18gillespiery recommends is below. I
do not recommend teams do this. Instead use either of the examples above.
Once again,
this code is not recommended!
Code:
public class Robot extends IterativeRobot {
private RobotDrive drive;
private Joystick joystick1;
private Joystick joystick2;
@Override
public void robotInit() {
drive = new RobotDrive(0, 1);
joystick1 = new Joystick(0);
joystick2 = new Joystick(0);
joystick2.setAxisChannel(AxisType.kY, 5);
}
@Override
public void teleopPeriodic() {
drive.tankDrive(joystick1, joystick2);
}
}