FRC Spark Motor Controller Coding Issue

I’m having the issue with the Spark Motor Controller. The code successfully deploys and the communication between the driver station and the roboRio is good, but when I try to drive the robot nothing moves. Here’s the code that I’m using :
private Spark motorLeft1 = new Spark(Constants.MOTOR_LEFT_1_ID);

private Spark motorLeft2 = new Spark(Constants.MOTOR_LEFT_2_ID);

private Spark motorRight1 = new Spark(Constants.MOTOR_RIGHT_1_ID);

private Spark motorRight2 = new Spark(Constants.MOTOR_RIGHT_2_ID);

Any help would be greatly appreciated.

If that’s it, you have no control setup, just four spark objects. Can you post your whole code to GitHub please?

I do have the controller setup. Sorry, being that I’m a rookie this year I don’t know how to use GitHub

Joystick driverController = new Joystick(Constants.DRIVER_CONTROLLER);

public double GetDriverRawAxis(int axis)

{

return driverController.getRawAxis(axis);

}

Where are you calling set() on the motors?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.