Only port 1 working on RoboRio

This is our current code:

package org.usfirst.frc.team4528.robot;

import edu.wpi.first.wpilibj.Joystick;

import edu.wpi.first.wpilibj.RobotDrive;

import edu.wpi.first.wpilibj.SampleRobot;

import edu.wpi.first.wpilibj.Victor;

import edu.wpi.first.wpilibj.Timer;

public class Robot15 extends SampleRobot {

			Victor frontLeft;
			Victor rearLeft;

			Victor frontRight;

			Victor rearRight;

			Victor motor;	//add-on
			RobotDrive myRobot;	// class that handles basic drive operations
			XBoxJoystick gamepad;	// declare gamepad as a Joystick object to get Joystick functionality, but with different buttons

		public void Robot()
			frontLeft = new Victor(1);	//change port to appropriate PWM port on roboRIO
			rearLeft = new Victor(2);	//change port to appropriate PWM port on roboRIO
			frontRight = new Victor(3);	//change port to appropriate PWM port on roboRIO
			rearRight = new Victor(4);	//change port to appropriate PWM port on roboRIO

			motor = new Victor(5);		//add-on
			myRobot = new RobotDrive(frontLeft, rearLeft, frontRight, rearRight);	// robot drivetrain functionality; takes in front left motor, rear left motor, front right motor, rear right motor ports
			gamepad = new XBoxJoystick(0);	// port gamepad is plugged into



		public void runMotor()

	        	if(gamepad.getLeftZ() > 0)




	        	else if(gamepad.getRightZ() > 0)








	//end of...

	 * Runs the motors with tank steering.
		public void operatorControl() 

			while (isOperatorControl() && isEnabled()) 
				myRobot.tankDrive(gamepad.getRightY(), gamepad.getLeftY());
				Timer.delay(0.005);		// wait for a motor update time


No matter what victor we connect to the RoboRIO in port 1, it works. None of the other ports work. The victors blink even when robot is enabled.

Any Victor we put in port 0 or 1 will turn solid when enabled, but any other will not. The PWM cable is not the issue either. We replaced the battery in case it was low voltage.

This code was working 5 days ago. Now it is not. We’ve re-imaged the RoboRio and uploaded the code again. Still same issue.

We don’t even call port 0 in our code but it runs the victor connected to port 1.

I don’t see anything wrong with the code.

It is unfortunately easy to get the PWM connection not-quite-right on a Victor. Find someone with lots of practice and have him or her verify that the cables are correctly plugged in. And make doubly sure at both ends that the connectors are not plugged in backwards.

We’ve done that. If I take the PWM out of port 1 and put it in port 2, it doesn’t work. If I take the PWM out of victor 1 and put it into victor 2, it doesn’t work. Any cable I swap into port 1 will work, and I can swap it among every victor and see each victor turn to solid light in turn.

But the big thing is, our code doesn’t initialize PWM port 0. But everything I just said for Port 1 is also true for port 0. So I’m at a complete loss.

An easy way to see if the PWM port is actually generating signals is to connect a servo to it. The servo will change angle when you change the applied “speed”. At full forward or full reverse, servos may end up jamming against their stops and making a ticking sound. Don’t do that for an extended time.

…except for the mismatch between the class named Robot15 and the constructor Robot(). That might be a problem.

and void before Robot() shouldn’t be there.

Don’t change the name of the main class!

Thanks! We completely reinstalled Java and Eclipse on the Classmate and then implemented the changes mentioned and it seems to be working.

Thanks so much for the help!