Skip to content

Instantly share code, notes, and snippets.

@technova12611
technova12611 / SpindexerControlTest.java
Created September 28, 2025 14:09
AI Generated Spindexer Opmode test
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.ColorSensor;
import com.qualcomm.robotcore.hardware.DcMotorEx;
@TeleOp(name = "SpindexerControlTest", group = "Examples")
public class SpindexerControlTest extends LinearOpMode {
@technova12611
technova12611 / SpindexerControlTest,java
Last active September 25, 2025 22:17
Spindexer test
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.ColorSensor;
import com.qualcomm.robotcore.hardware.DcMotorEx;
@TeleOp(name = "SpindexerControlTest", group = "Examples")
public class SpindexerControlTest extends LinearOpMode {
@technova12611
technova12611 / Spindexer.java
Last active September 25, 2025 22:11
Spindexer
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.hardware.ColorSensor;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.DcMotorEx;
import com.qualcomm.robotcore.hardware.PIDFCoefficients;
import com.qualcomm.robotcore.util.ElapsedTime;
import org.firstinspires.ftc.robotcore.external.Telemetry;
public class Spindexer {
package org.firstinspires.ftc.teamcode.pedroPathing.follower;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.drivePIDFFeedForward;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.drivePIDFSwitch;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.forwardZeroPowerAcceleration;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.headingPIDFFeedForward;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.headingPIDFSwitch;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.lateralZeroPowerAcceleration;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftFrontMotorName;
import static org.firstinspires.ftc.teamcode.pedroPathing.tuning.FollowerConstants.leftRearMotorName;
package org.firstinspires.ftc.teamcode.pedroPathing.localization;
import com.qualcomm.robotcore.hardware.IMU;
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.Vector;
/**
* This is the Localizer class. It is an abstract superclass of all localizers used in Pedro Pathing,
* so it contains abstract methods that will have a concrete implementation in the subclasses. Any
* method that all localizers will need will be in this class.
package org.firstinspires.ftc.teamcode.pedroPathing.localization;
import com.qualcomm.hardware.lynx.LynxModule;
import com.qualcomm.robotcore.hardware.HardwareMap;
import com.qualcomm.robotcore.hardware.IMU;
import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit;
import org.firstinspires.ftc.teamcode.pedroPathing.localization.localizers.PinpointLocalizer;
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.MathFunctions;
import org.firstinspires.ftc.teamcode.pedroPathing.pathGeneration.Vector;
package org.firstinspires.ftc.teamcode.pedroPathing.localization.localizers;
import android.util.Log;
import com.qualcomm.robotcore.hardware.HardwareMap;
import com.qualcomm.robotcore.util.ElapsedTime;
import com.qualcomm.robotcore.util.RobotLog;
import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit;
@technova12611
technova12611 / MyTeleOps.java
Created August 12, 2024 18:22
Java FTC Training
package org.firstinspires.ftc.teamcode.opmode.teleops;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.Gamepad;
import org.firstinspires.ftc.teamcode.subsystem.MyIntake;
@TeleOp(group = "Drive", name = "My Manual Drive")
public class MyTeleOps extends LinearOpMode {
@technova12611
technova12611 / VisionPortals.java
Last active March 25, 2024 18:24
Code to enable VisionPortals with 2 camera.
// use front camera for team prop and back camera for the apriltag and yellow preload detection
// Must set the ViewId for each portal
// Can't enable live View, won't work if enabled
// use scrcpy to see both livestreams
// on the driver hub/phone, the livestream of the last Portal initialized is shown
protected void initVisionPortal() {
int[] visionPortalViewIDs = VisionPortal.makeMultiPortalView(2,
VisionPortal.MultiPortalLayout.HORIZONTAL);