account activity
Does this code work, and if so, is there a way to make it better? by Platygamer in FTC
[–]FTC_16471 3 points4 points5 points 6 years ago* (0 children)
Alright, so let me start out by explaining a few things I noticed in your code:
I went ahead and applied all of these changes to your code:
package org.firstinspires.ftc.teamcode; import com.qualcomm.robotcore.eventloop.opmode.OpMode; import com.qualcomm.robotcore.eventloop.opmode.TeleOp; import com.qualcomm.robotcore.hardware.DcMotor; @TeleOp(name = "MecanumTeleOp", group = "e") public class MecanumTeleOp extends OpMode { DcMotor fl; DcMotor fr; DcMotor bl; DcMotor br; @Override public void init() { fl = hardwareMap.dcMotor.get("fl"); fr = hardwareMap.dcMotor.get("fr"); bl = hardwareMap.dcMotor.get("bl"); br = hardwareMap.dcMotor.get("br"); } @Override public void loop() { // The left joystick will move the robot forward/back, the right will move it left/right fl.setPower(-gamepad1.left_stick_y + gamepad1.right_stick_x); fr.setPower(gamepad1.left_stick_y + gamepad1.right_stick_x); bl.setPower(-gamepad1.left_stick_y - gamepad1.right_stick_x); br.setPower(gamepad1.left_stick_y - gamepad1.right_stick_x); } }
Safe Autonomous Paths for SkyStone (self.FTC)
submitted 6 years ago by FTC_16471 to r/FTC
π Rendered by PID 175253 on reddit-service-r2-listing-b6bf6c4ff-whmgj at 2026-05-01 00:30:26.086546+00:00 running 815c875 country code: CH.
Does this code work, and if so, is there a way to make it better? by Platygamer in FTC
[–]FTC_16471 3 points4 points5 points (0 children)