Can we get a simple program to upload? We have try simple robot from the library. We have no compiling or driver station errors, but the robot doesnt move.
We have changed drives and motors and verified wiring many times.
Any Idea’s?
Welcome to Chief Delphi!
Presumably you have the roboRIO powered up–what do the status LEDs indicate? The driver’s station is running…do the Communications, Robot Code, and Joysticks lights all illuminate green? What code are you trying to run on the robot–what language, and what program? What is connected to the roboRIO–if speed controllers, are you sure they have power? Do the status lights on those tell you anything?
Sorry to ask so many questions–with the information you’ve given there’s quite a few possible failure modes. Happy to help narrow this down with you.
Jacob
What does your code look like? My guess is you are using a base example that doesn’t actually command anything to move.
This is our java program:
package org.usfirst.frc.team5914.robot;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Victor;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
/**
-
The VM is configured to automatically run this class, and to call the
-
functions corresponding to each mode, as described in the IterativeRobot
-
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 Robot extends IterativeRobot {
final String defaultAuto = “Default”;
final String customAuto = “My Auto”;
String autoSelected;
SendableChooser chooser;/**
-
This function is run when the robot is first started up and should be
-
used for any initialization code.
*/
Joystick stick;
Victor m1;
public void robotInit() {stick = new Joystick(0);
m1 = new Victor(1);chooser = new SendableChooser();
chooser.addDefault(“Default Auto”, defaultAuto);
chooser.addObject(“My Auto”, customAuto);
SmartDashboard.putData(“Auto choices”, chooser);
}
/**
- This autonomous (along with the chooser code above) shows how to select between different autonomous modes
- using the dashboard. The sendable chooser code works with the Java SmartDashboard. If you prefer the LabVIEW
- Dashboard, remove all of the chooser code and uncomment the getString line to get the auto name from the text box
- below the Gyro
- You can add additional auto modes by adding additional comparisons to the switch structure below with additional strings.
- If using the SendableChooser make sure to add them to the chooser code above as well.
*/
public void autonomousInit() {
autoSelected = (String) chooser.getSelected();
// autoSelected = SmartDashboard.getString(“Auto Selector”, defaultAuto);
System.out.println("Auto selected: " + autoSelected);
}
/**
- This function is called periodically during autonomous
*/
public void autonomousPeriodic() {
switch(autoSelected) {
case customAuto:
//Put custom auto code here
break;
case defaultAuto:
default:
//Put default auto code here
break;
}
}
/**
- This function is called periodically during operator control
*/
public void teleopPeriodic() {
//while (isOperatorControl() && isEnabled()) {
m1.set(stick.getY());
// }
}
/**
- This function is called periodically during test mode
*/
public void testPeriodic() {
}
-
}
Is the Victor in PWM slot 1 on the RIO? A common mistake is the use of PWM slot 0 as 1; that is a vestige in the minds of everyone who transitioned from programming the cRIO to the roboRIO. Check all wiring, particularly the PWM cables. We had a problem where the PWM cables’ male ends were not long enough to fit into the Victors. Pulling on the ends slightly with a pair of pliers solved that problem. Please tell us what the Victor’s light is like (solid or flashing) when enabling the robot.
We got it, thanks for all of your assistance! Greatly appreciated!!!