sure here it is:
Code:
package team2185.code.exhibtionCode;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Watchdog;
public class ExhibtionCode extends IterativeRobot {
// DEFINING THE JAGUARS
Jaguar lm1 = new Jaguar(1); // left motor
Jaguar lm2 = new Jaguar(2);
Jaguar rm1 = new Jaguar(3); // right motor
Jaguar rm2 = new Jaguar(4);
RobotDrive driveSys = new RobotDrive (lm1, lm2, rm1, rm2);
Joystick control = new Joystick(1);
//****************************************************************************//
public void robotInit() {
// INITIALIZATION CODE
// code in here runs when the robot first starts up
}
public void autonomousInit() {
for(int i=0; i<4; i++){
driveSys.drive(0.5,0);
Timer.delay(2.0);
driveSys.drive(0,0.75);
Timer.delay(1.0);
}
}
public void teleopInit() {
// TELEOPERATED INTIALIZATION CODE
// runs only once at the start of the teleop period
}
//****************************************************************************//
public void autonomousPeriodic() {
// called periodically during the autonomous period
}
public void teleopPeriodic() {
if (control.getRawButton(1)){ // if button 1 pressed drive at full speed
driveSys.tankDrive(control, 2, control, 5);
}else { // else drive at half speed
driveSys.tankDrive(control, 2, control, 5);
driveSys.setMaxOutput(0.5);
}
}
//****************************************************************************//
public void disabledInit() {
driveSys.drive(0.0, 0.0);
}
}