auto blue, and red front have been made not tested but values switched
This commit is contained in:
@ -214,6 +214,7 @@ public class bluefront extends LinearOpMode {
|
|||||||
gripper = hardwareMap.get(Servo.class, "gripper");
|
gripper = hardwareMap.get(Servo.class, "gripper");
|
||||||
arm = hardwareMap.get(DcMotor.class, "arm raise");
|
arm = hardwareMap.get(DcMotor.class, "arm raise");
|
||||||
wrist = hardwareMap.get(Servo.class, "wrist");
|
wrist = hardwareMap.get(Servo.class, "wrist");
|
||||||
|
wrist.setPosition(1);
|
||||||
// To drive forward, most robots need the motor on one side to be reversed, because the axles point in opposite directions.
|
// To drive forward, most robots need the motor on one side to be reversed, because the axles point in opposite directions.
|
||||||
// When run, this OpMode should start both motors driving forward. So adjust these two lines based on your first test drive.
|
// When run, this OpMode should start both motors driving forward. So adjust these two lines based on your first test drive.
|
||||||
// Note: The settings here assume direct drive on left and right wheels. Gear Reduction or 90 Deg drives may require direction flips
|
// Note: The settings here assume direct drive on left and right wheels. Gear Reduction or 90 Deg drives may require direction flips
|
||||||
@ -257,7 +258,7 @@ public class bluefront extends LinearOpMode {
|
|||||||
int blueleft = readColorLeft();
|
int blueleft = readColorLeft();
|
||||||
int blueright = readColorRight();
|
int blueright = readColorRight();
|
||||||
double backboard = 29;
|
double backboard = 29;
|
||||||
if (blueleft > 100)
|
if (blueleft > 75)
|
||||||
{
|
{
|
||||||
//telemetry.addData("color sensor","left");
|
//telemetry.addData("color sensor","left");
|
||||||
if(blueleft > blueright)
|
if(blueleft > blueright)
|
||||||
@ -283,7 +284,7 @@ public class bluefront extends LinearOpMode {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (blueright > 100)
|
if (blueright > 75)
|
||||||
{
|
{
|
||||||
if(blueleft < blueright)
|
if(blueleft < blueright)
|
||||||
telemetry.addData("color sensor","right");
|
telemetry.addData("color sensor","right");
|
||||||
|
Reference in New Issue
Block a user