Thread: Drive Issue
View Single Post
  #5   Spotlight this post!  
Unread 06-02-2013, 13:00
Mr.Roboto3335's Avatar
Mr.Roboto3335 Mr.Roboto3335 is offline
Wait, What?
AKA: Jimmy
FRC #3335 (Cy-Borgs)
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Texas
Posts: 47
Mr.Roboto3335 is an unknown quantity at this point
Re: Drive Issue

This is it so far.

/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/

package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Timer;

/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the SimpleRobot
* documentation. If you change the name of this class or the package after
* creating this project, you must also update the manifest file in the resource
* directory.
*/
public class TheReaper extends SimpleRobot {
RobotDrive drive = new RobotDrive(1, 2);
Joystick leftStick = new Joystick(1);
Joystick rightStick = new Joystick(2);

/**
* This function is called once each time the robot enters autonomous mode.
*/
public void autonomous() {

}

/**
* This function is called once each time the robot enters operator control.
*/
public void operatorControl() {
while (isOperatorControl() && isEnabled()){

drive.tankDrive(leftStick, rightStick);
Timer.delay(0.01);
}

}

/**
* This function is called once each time the robot enters test mode.
*/
public void test() {

}
}
__________________
Wait, what?
Reply With Quote