View Single Post
  #1   Spotlight this post!  
Unread 15-02-2011, 00:55
Bluedog24 Bluedog24 is offline
Head Programmer
AKA: Joey Ipock
FRC #1544 (One Byte Short)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Anchorage, Alaska
Posts: 14
Bluedog24 is an unknown quantity at this point
Robot driving off.

Why would our robot try to run off? After I uploaded the code and enabled it on the driver station, without touching the joystick, the wheels started running at full speed and wouldn't stop.

Here's the code and I was using a Logitech Dual Action controller.

Code:
package edu.wpi.first.wpilibj.templates;



import edu.wpi.first.wpilibj.*; //Imports everything


public class RobotTemplate extends SimpleRobot {
RobotDrive drive = new RobotDrive(1,2,3,4); //Signal wires from jaguars to digital sidecar
Joystick stick = new Joystick(1); //Logitech Dual Action controller
Joystick arm = new Joystick(2); //Logitech Attack 3 controller

public RobotTemplate(){
    getWatchdog().setExpiration(0.5);
    
    compressor.start();
    
}

    public void autonomous() { //Autonomous
        
    }


    public void operatorControl() { 
   while (true && isOperatorControl() && isEnabled()) { 
       getWatchdog().feed();
       drive.mecanumDrive_Polar(stick.getDirectionDegrees(), stick.getMagnitude(),stick.getRawAxis(4));
       Timer.delay(0.005); 


        }
    }
}
Any ideas?
Reply With Quote