Created
September 13, 2015 01:27
-
-
Save ArchdukeTim/8eadfadeef17e1ea22a3 to your computer and use it in GitHub Desktop.
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
package com.qualcomm.ftcrobotcontroller.opmodes; | |
import com.qualcomm.robotcore.eventloop.opmode.OpMode; | |
import com.qualcomm.robotcore.hardware.DcMotor; | |
/** | |
* Created by winterst on 9/12/15. | |
*/ | |
public class Arcade extends OpMode{ | |
DcMotor motorRight; | |
DcMotor motorLeft; | |
Object [] components; | |
Drive drive; | |
public void init() | |
{ | |
motorRight = hardwareMap.dcMotor.get("motor_2"); | |
motorLeft = hardwareMap.dcMotor.get("motor_1"); | |
motorLeft.setDirection(DcMotor.Direction.REVERSE); | |
drive = new Drive(motorRight, motorLeft); | |
Object [] components = { | |
drive | |
}; | |
} | |
public void loop() | |
{ | |
drive.move(gamepad1.left_stick_x, gamepad1.left_stick_y); | |
for(Object component: components) | |
{ | |
component.doit(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment