Skip to content

Commit

Permalink
Merge pull request FIRST-Tech-Challenge#4 from Mouse05/master
Browse files Browse the repository at this point in the history
Hopper
  • Loading branch information
Sweekrit-B authored Dec 22, 2020
2 parents 7042ad9 + 283706c commit 8df39ea
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ abstract class IntakeClass extends LinearOpMode
{

protected DcMotor intake;
protected DcMotor hopper;

public void runOpMode() {
setupDriveMotors();
Expand All @@ -26,6 +27,7 @@ protected void setupDriveMotors() {

updateTelemetryMessage("Initializing Motors");
intake = hardwareMap.get(DcMotor.class, "intake");
hopper = hardwareMap.get(DcMotor.class, "hopper");


// Most robots need the motor on one side to be reve`rsed to drive goBackward
Expand All @@ -49,7 +51,7 @@ protected void setupDriveMotors() {

public void stop(final String message) {
intake.setPower(0.0);

hopper.setPower(0.0);

updateTelemetryMessage(message);
}
Expand Down Expand Up @@ -82,7 +84,10 @@ public void intake(final double intakepower, final int duration){
sleep(duration);
}


public void hopper(final double hopperpower, final int duration){
hopper.setPower(hopperpower);
sleep(duration);
}

/*
public void armUp(final double armpower, final int duration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ public void runOpModeImpl() {
intake.setPower(0);
}

if (gamepad1.x) {
hopper.setPower(1);
}

if (gamepad1.y) {
hopper.setPower(0);
}
// left bumper - to close claw (front servo)


Expand Down

0 comments on commit 8df39ea

Please sign in to comment.