cRIO not functioning

so I am the new programmer for my team. problem is I’m new to this FRC thing.
At the moment I am trying to code our robot so that we can drive in tank drive, and have a relay spike control one of our motors (in the future have 3 relay spikes control 3 motors) that will bring the ball off ground like a crane.

This is my code:
// Define user inputs
Joystick leftStick = new Joystick(1);
Joystick rightStick = new Joystick(2);

// Define the motor controllers. Uses the Jaguar PWM Modules
    Jaguar left 	= new Jaguar(1);
Jaguar right	= new Jaguar(2);
    RobotDrive drive = new RobotDrive(1, 3, 2, 4);
    //relay modules please
    Relay lowBall = new Relay(5);
    //Relay upBall = new Relay(6); //future 2 relay's
    //Relay shootBall = new Relay(7);

public void operatorControl() { //new control
//
//----------
// Human Operation Mode
//----------
while (isEnabled()) {
//
Watchdog.getInstance().feed();

		DriverStationLCD.getInstance().updateLCD();
		
		drive.tankDrive(leftStick, rightStick);
		// if button pressed reverse the specified ballMotor.
                    if(leftStick.getRawButton(2))
                        lowBall.set(Relay.Value.kReverse);
                    else
                        lowBall.set(Relay.Value.kForward);
                    
                    //if(leftStick.getRawButton(3))
                    //    upBall.set(Relay.Value.kReverse);
                    //else
                    //    upBall.set(Relay.Value.kForward);
                    
                    //if(rightStick.getTrigger())
                    //    shootBall.set(Relay.Value.kForward);
                    //else
                     //   shootBall.set(Relay.Value.kOff);
	}
}

I have all the necessary imports, I hope, here they are if it helps:
import edu.wpi.first.wpilibj.camera.AxisCamera;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Watchdog;
import edu.wpi.first.wpilibj.DriverStationLCD;
import edu.wpi.first.wpilibj.Joystick.AxisType;

Issue:
for some reason, after this code is uploaded to the cRIO, nothing happens.
nothing functions, I cannot even drive it, no motors work, nothing works.
I’ve tried many things, like switching from, extends SimpleRobot, to extends IterativeRobot. I’ve checked, re-installed, re-everything the plug-ins and what not. We have connection, and our computer is talking with the cRIO. But still nothing happens.

Question:
Does anyone know why our cRIO (robot) isn’t functioning? thanks for the help in advance.

A quick check:

  • Power on the robot. Jaguars should blink yellow.
  • Your digital sidecar has 3 LEDs for the different voltages. Are all 3 lit up?
  • Enable the robot in teleop mode on the driver station. Jaguars should be solid yellow. If not, your digital module on the cRIO is in the wrong slot, not seated correctly in the slot, or the ribbon cable is unplugged/incorrectly made (as some of them were).

You also start your Relay at 5. Relays are not PWM outputs. Relays are off of the relay connectors on the digital sidecar. Did you realize this or is it plugged into the digital sidecar in PWM output 5?

FYI… You can’t use a spike to control a CIM. You must use a power controller (Jaguar or Victor).

Yep, and in fact there’s a rule about that (http://www.chiefdelphi.com/forums/showpost.php?p=1116421&postcount=6). CIM motors draw too much current to be safely used with a spike, IIRC

doublepost

ok, today, I tried taking out the while loop I had, and took out the if statement to see if that was messing with the robot, and nothing happened still.

So, I found out some new information. NetBeans is only uploading the BuiltInDefaultCode and not the one’s we have created. Is there at all a fix to this?

Make sure you’re deploying the right project. Right click your project in the Project Explorer tab and click set as main project.

Only two of the three voltage lights on the side car are lit up. how do i get the third? i have 12v and 24v, but not 5v. help?

thanks everyone! the issue is now fixed.
I could cry tears of joy right now.

cRIO or NB one of the two wasn’t keen on my class name BallBot for some reason, using the SimpleRobot extension gave errors for some reason, and I needed to identify the Main Project.

When you are creating your project, it will ask you for a main class name; If you change it, you need to tell Netbeans (actually, ant) by editing “build.xml”.