forked from ftctechnh/ftc_app
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Saturday: Autonomus (IM TIERED!! NEED SLEEP) ftctechnh#1 working on M…
…acine learning
- Loading branch information
1 parent
cd8069b
commit 65a5fea
Showing
1 changed file
with
50 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package suitbots; | ||
|
||
import com.qualcomm.robotcore.eventloop.opmode.OpMode; | ||
import com.qualcomm.robotcore.eventloop.opmode.TeleOp; | ||
import com.qualcomm.robotcore.hardware.ColorSensor; | ||
import com.suitbots.util.Controller; | ||
|
||
/** | ||
* Created by Samantha on 10/21/2017. | ||
*/ | ||
|
||
@TeleOp(name = "Data Gather-er", group = "Tournament") | ||
public class DataCollectionTeleOp extends OpMode { | ||
private ColorSensor jewelColorDetector; | ||
private Controller g1, g2; | ||
private boolean debug_mode = false; | ||
private boolean near; | ||
|
||
|
||
public void getColor() { | ||
jewelColorDetector.alpha(); | ||
} | ||
|
||
@Override | ||
public void init() { | ||
jewelColorDetector = hardwareMap.colorSensor.get("jewelColorDetector"); | ||
g1 = new Controller(gamepad1); | ||
g2 = new Controller(gamepad2); | ||
} | ||
|
||
|
||
|
||
|
||
@Override | ||
public void loop() { | ||
// if(g1.XOnce()){ | ||
// | ||
// }else if(g1.BOnce()){ | ||
// | ||
// } | ||
telemetry.addData("Color Alpha - ",jewelColorDetector.alpha()); | ||
telemetry.addData("Color Blue - ",jewelColorDetector.blue()); | ||
telemetry.addData("Color Red - ",jewelColorDetector.red()); | ||
telemetry.addData("Color Green - ",jewelColorDetector.green()); | ||
|
||
g1.update(); | ||
g2.update(); | ||
telemetry.update(); | ||
} | ||
} |