-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBClimbUp.java
56 lines (44 loc) · 1.3 KB
/
BClimbUp.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* 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);}
}
}