forked from Hutouben/FTC-Code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFtc sim.java
More file actions
59 lines (46 loc) · 1.72 KB
/
Ftc sim.java
File metadata and controls
59 lines (46 loc) · 1.72 KB
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
57
58
59
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.Servo;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.hardware.bosch.BNO055IMU;
@TeleOp(name="ALI")
public class SEAMAutonAli extends LinearOpMode {
Servo hookL;
Servo hookR;
DcMotor backLeftDrive;
DcMotor backRightDrive;
DcMotor frontLeftDrive;
DcMotor frontRightDrive;
DcMotor wrist;
DcMotor leftShoulder;
DcMotor rightShoulder;
BNO055IMU imu;
@Override
public void runOpMode() {
hookL = hardwareMap.get(Servo.class, "hookL");
hookR = hardwareMap.get(Servo.class, "hookR");
/* backLeftDrive = hardwareMap.get(DcMotor.class, "backLeftDrive");
backRightDrive = hardwareMap.get(DcMotor.class, "backRightDrive");
frontLeftDrive = hardwareMap.get(DcMotor.class, "frontLeftDrive");
frontRightDrive = hardwareMap.get(DcMotor.class, "frontRightDrive");
wrist = hardwareMap.get(DcMotor.class, "wrist");
leftShoulder = hardwareMap.get(DcMotor.class, "leftShoulder");
rightShoulder = hardwareMap.get(DcMotor.class, "rightShoulder");
imu = hardwareMap.get(BNO055IMU.class, "imu");
*/
// Put initialization blocks here
waitForStart();
// Put run blocks here
while (opModeIsActive()) {
if (gamepad1.y){
hookL.setPosition(0);
}
else if(gamepad1.b){
hookL.setPosition(0.5);
}
else if(gamepad1.a){
hookL.setPosition(1);
}
}
}
}