Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
took one talon and one solenoid off arm and added old talon on arm to
catapult
  • Loading branch information
2374 committed Dec 9, 2017
1 parent 9e6034b commit cece46e
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 15 deletions.
Binary file modified 2017_BunnyBot/bin/org/usfirst/frc/team2374/robot/RobotMap.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified 2017_BunnyBot/dist/FRCUserProgram.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ public class RobotMap {
public static final int TALON_RIGHT_MASTER_1 = 6; // front right CIM
public static final int TALON_RIGHT_MASTER_2 = 7; // back right CIM

public static final int TALON_CATAPULT_1 = 0;
public static final int TALON_CATAPULT_1 = 9; //BEFORE KATYA; 0; second talon motor taken out, used for catapult now
public static final int SOLENOID_CATAPULT_1 = 2;
public static final int SOLENOID_CATAPULT_2 = 3;

public static final int TALON_ARM_1 = 8; // first motor for the arm
public static final int TALON_ARM_2 = 9; // second motor for the arm
// public static final int TALON_ARM_2 = 9; second motor for the arm; second motor taken out
public static final int SOLENOID_ARM_1 = 0; // first solenoid for the arm
public static final int SOLENOID_ARM_2 = 1; // second solenoid for the arm
public static final int SOLENOID_ARM_3 = 4; // third solenoid for the arm
public static final int SOLENOID_ARM_4 = 5; // fourth solenoid for the arm
//public static final int SOLENOID_ARM_3 = 4; third solenoid for the arm; one solenoid was removed with arm redesign
//public static final int SOLENOID_ARM_4 = 5; fourth solenoid for the arm

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@

public class Arm extends Subsystem {

private Talon talon1, talon2;
private DoubleSolenoid solenoid1, solenoid2;
private Talon talon1; // talon2 removed
private DoubleSolenoid solenoid1; //solenoid2 removed
private Compressor airCompressor;

private static final double MOTOR_SPEED = 1.0;

public Arm () {
talon1 = new Talon(RobotMap.TALON_ARM_1);
talon2 = new Talon(RobotMap.TALON_ARM_2);
//talon2 = new Talon(RobotMap.TALON_ARM_2);
airCompressor = new Compressor();
airCompressor.start();
solenoid1 = new DoubleSolenoid(RobotMap.SOLENOID_ARM_1, RobotMap.SOLENOID_ARM_2);
solenoid2 = new DoubleSolenoid(RobotMap.SOLENOID_ARM_3, RobotMap.SOLENOID_ARM_4);
//solenoid2 = new DoubleSolenoid(RobotMap.SOLENOID_ARM_3, RobotMap.SOLENOID_ARM_4);
}

@Override
Expand All @@ -32,31 +32,31 @@ public Arm () {
// moves the pistons in the arm
public void pistonsStart() {
solenoid1.set(Value.kReverse);
solenoid2.set(Value.kForward);
//solenoid2.set(Value.kForward);
}

public void pistonsStop() {
solenoid1.set(Value.kForward);
solenoid2.set(Value.kReverse);
//solenoid2.set(Value.kReverse);
}

public boolean getPistons() { return solenoid1.equals(Value.kForward) && solenoid2.equals(Value.kForward); }
public boolean getPistons() { return solenoid1.equals(Value.kForward); } // solenoid2.equals(Value.kForward)

// The motors may need to spin in opposite directions ask mechanical later
public void motorsForward() {
talon1.setSpeed(MOTOR_SPEED);
talon2.setSpeed(-MOTOR_SPEED);
//talon2.setSpeed(-MOTOR_SPEED);
}

// The motors may need to spin in opposite directions ask mechanical later
public void motorsBackwards() {
talon1.setSpeed(-MOTOR_SPEED);
talon2.setSpeed(MOTOR_SPEED);
//talon2.setSpeed(MOTOR_SPEED);
}

public void motorsStop() {
talon1.setSpeed(0);
talon2.setSpeed(0);
//talon2.setSpeed(0);
}

// talon1 and talon2 should have the same speed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ public class Catapult extends Subsystem {

public Catapult() {
// if this doesn't work find a way to get pwm ports from navx
catapult1 = new Talon(RobotMap.TALON_CATAPULT_1 + 10);
catapult1 = new Talon(RobotMap.TALON_CATAPULT_1);
/*
* KAT: I deleted the +10 in the new Talon(RobotMap.TALON_CATAPULT_1) because the arm redesign took out the second motor
* this gives us room to put the catapult within the 10 PWM Ports on the roborio. NAVX problem solved!
*/
solenoid = new DoubleSolenoid(RobotMap.SOLENOID_CATAPULT_1, RobotMap.SOLENOID_CATAPULT_2);
}

Expand Down

0 comments on commit cece46e

Please sign in to comment.