View Single Post
  #14   Spotlight this post!  
Unread 30-01-2014, 16:29
SpaceCows SpaceCows is offline
Registered User
FRC #5202
 
Join Date: Jan 2014
Location: New Rochelle
Posts: 15
SpaceCows is an unknown quantity at this point
Re: Help A Brotha Out. Error 44002 and 44004.

Ah okay, good news. We fixed the connection issue with our cRIO and rebooted our computer and everything was working. We were able to load our code on to the robot and enable Operation modes in the FRC Driver Station. Unfortunately, nothing is happening. We have the "Hello World" program from the guide written in Netbeans and the motors are not turning.

Code:
package edu.wpi.first.wpilibj.templates;
http://www.chiefdelphi.com/forums/editpost.php?do=editpost&p=1334953
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.RobotDrive;

public class RobotTemplate extends SimpleRobot {
    
    RobotDrive chassis = 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() {
      chassis.setSafetyEnabled(false);
      chassis.drive(-0.5, 0.0);
      Timer.delay(2.0);
      chassis.drive(0.0, 0.0);
    }

    /**
     * This function is called once each time the robot enters operator control.
     */
    public void operatorControl() {
        chassis.setSafetyEnabled(true);
        while(isOperatorControl() && isEnabled()){
            chassis.tankDrive(leftStick, rightStick);
            Timer.delay(0.01);
        }
    }
At least we have made some progress and cleaned up our wires.

The motors are put into the correct ports, in case you were wondering.

EDIT: after attempting to debug, it seems that the robot isn't ever reaching the code that tell the motors to turn the wheels

Last edited by SpaceCows : 30-01-2014 at 16:41.