-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Chengyu Benton Li
authored
Jan 10, 2019
1 parent
5826b9e
commit c8ee883
Showing
10 changed files
with
289 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,56 @@ | ||
|
||
package org.firstinspires.ftc.teamcode; | ||
|
||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous; | ||
import com.qualcomm.robotcore.util.ElapsedTime; | ||
import com.qualcomm.robotcore.eventloop.opmode.OpMode; | ||
import com.qualcomm.robotcore.hardware.DcMotor; | ||
|
||
@Autonomous(name="B Climb Up ") | ||
|
||
public class BClimbUp extends OpMode{ | ||
private DcMotor[] drive = new DcMotor[2]; | ||
private DcMotor dick = null; | ||
private int counter = 0; | ||
|
||
@Override | ||
public void init() { | ||
drive[0] = hardwareMap.get(DcMotor.class, "mot0"); | ||
drive[1] = hardwareMap.get(DcMotor.class, "mot1"); | ||
dick = hardwareMap.get(DcMotor.class, "mot2"); | ||
drive[0].setDirection(DcMotor.Direction.FORWARD); | ||
drive[1].setDirection(DcMotor.Direction.FORWARD); | ||
dick.setDirection(DcMotor.Direction.REVERSE); | ||
telemetry.addData("Status", "Initialized"); | ||
|
||
} | ||
|
||
@Override | ||
public void init_loop() { | ||
|
||
} | ||
|
||
@Override | ||
public void start() { | ||
|
||
} | ||
public ElapsedTime runTime = new ElapsedTime(); | ||
|
||
|
||
@Override | ||
public void loop() { | ||
if(runTime.time() < 14 ) | ||
{ | ||
dick.setPower(0.75); | ||
} | ||
else{ | ||
dick.setPower(0);} | ||
|
||
|
||
} | ||
} | ||
/* | ||
* Author: Benton Li '19 | ||
* Version: 1.0 | ||
* | ||
* */ | ||
package org.firstinspires.ftc.teamcode; | ||
|
||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous; | ||
import com.qualcomm.robotcore.eventloop.opmode.Disabled; | ||
import com.qualcomm.robotcore.util.ElapsedTime; | ||
import com.qualcomm.robotcore.eventloop.opmode.OpMode; | ||
import com.qualcomm.robotcore.hardware.DcMotor; | ||
@Disabled | ||
@Autonomous(name="B Climb Up ") | ||
|
||
public class BClimbUp extends OpMode{ | ||
private DcMotor[] drive = new DcMotor[2]; | ||
private DcMotor bentonSucks = null; | ||
private int counter = 0; | ||
|
||
@Override | ||
public void init() { | ||
drive[0] = hardwareMap.get(DcMotor.class, "mot0"); | ||
drive[1] = hardwareMap.get(DcMotor.class, "mot1"); | ||
bentonSucks = hardwareMap.get(DcMotor.class, "mot2"); | ||
drive[0].setDirection(DcMotor.Direction.FORWARD); | ||
drive[1].setDirection(DcMotor.Direction.FORWARD); | ||
bentonSucks.setDirection(DcMotor.Direction.REVERSE); | ||
telemetry.addData("Status", "Initialized"); | ||
|
||
} | ||
|
||
@Override | ||
public void init_loop() { | ||
|
||
} | ||
|
||
@Override | ||
public void start() { | ||
|
||
} | ||
public ElapsedTime runTime = new ElapsedTime(); | ||
|
||
|
||
@Override | ||
public void loop() { | ||
if(runTime.time() < 14 ) | ||
{ | ||
bentonSucks.setPower(0.75); | ||
} | ||
else{ | ||
bentonSucks.setPower(0);} | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.