diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/MyFIRSTJavaOpMode.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/MyFIRSTJavaOpMode.java new file mode 100644 index 000000000000..e25566e35f03 --- /dev/null +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/MyFIRSTJavaOpMode.java @@ -0,0 +1,41 @@ +package org.firstinspires.ftc.teamcode; + +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.DcMotor; +import com.qualcomm.robotcore.hardware.DigitalChannel; +import com.qualcomm.robotcore.hardware.DistanceSensor; +import com.qualcomm.robotcore.hardware.Gyroscope; +import com.qualcomm.robotcore.hardware.Servo; + +@TeleOp + +public class MyFIRSTJavaOpMode extends LinearOpMode { + private Gyroscope imu; + private DcMotor motorTest; + private DigitalChannel digitalTouch; + private DistanceSensor sensorColorRange; + private Servo servoTest; + + + @Override + public void runOpMode() { + imu = hardwareMap.get(Gyroscope.class, "imu"); + motorTest = hardwareMap.get(DcMotor.class, "motorTest"); + digitalTouch = hardwareMap.get(DigitalChannel.class, "digitalTouch"); + sensorColorRange = hardwareMap.get(DistanceSensor.class, "sensorColorRange"); + servoTest = hardwareMap.get(Servo.class, "servoTest"); + + telemetry.addData("Status", "Initialized"); + telemetry.update(); + // Wait for the game to start (driver presses PLAY) + waitForStart(); + + // run until the end of the match (driver presses STOP) + while (opModeIsActive()) { + telemetry.addData("Status", "Running"); + telemetry.update(); + + } + } +}