Try adding some diagnostic tools to your code.
For example at the end of your constructor, try adding the following two lines:
Code:
LiveWindow.addActuator("Drive", "Left Motor", drivemotor1);
LiveWindow.addActuator("Drive", "Right Motor", drivemotor2);
If you deploy the code and put your Driver Station in "Test" mode, you should see two sliders appear on your SmartDashboard related to your drive motors. You should be able to adjust the sliders and see the motors turn.
You can also add "debug output" that appears during normal operation. Try adding the following field (lastDashboardUpdate) and method to your Robot class:
Code:
// time stamp of last time we sent values to dash board
private double lastDashboardUpdate = 0;
private void updateDashboard() {
double now = Timer.getFPGATimestamp();
// Diagnostic updates about 10 times a second
if ((now - lastDashboardUpdate) > 0.1) {
lastDashboardUpdate = now;
// Diagnostic information about the state of the robot
SmartDashboard.putNumber("Left Stick", xboxController.getRawAxis(2));
SmartDashboard.putNumber("Right Stick", xboxController.getRawAxis(5));
SmartDashboard.putNumber("Left Drive Power", drivemotor1.get());
SmartDashboard.putNumber("Right Drive Power", drivemotor2.get());
}
}
Then, inside the while() loop in your operatorControl() method, call the new updateDashboard() method.
Deploy the code and start the driver station in Teleop mode. You should see values update on your smart dashboard corresponding to the inputs on your game pad and the output power of your drive motors. If you see zero values on your joysticks even when you are moving them, check the driver station console and make certain that your gamepad has not been re-mapped to a different port.
After you get things working on the drive, you can comment out the debug output in the updateDashboard() method and use this approach to troubleshoot the rest of your components.