Errors on motor

Hello fellows,

I am currently trying to program a spark max to pg motor.
I set up very simple code that I thought might work, however I am getting errors and I don’t understand why. I would much appreciate some advice or help.

ERROR  1  The startCompetition() method (or methods called by it) should have handled the exception above.  edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:380) 
 Error at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:380): The startCompetition() method (or methods called by it) should have handled the exception above.

Based on that message, I’m assuming there is further error message text that you haven’t included. That will help us narrow it down.

Before getting that, my suspicions would either be two different motor controllers trying to be assigned to the same PWM port or CAN ID, or forgetting to initialize the motor controller.

As @Christopher149 mentioned, there is almost certainly more to the message above what you copied, and it almost certainly includes the solution in it.

That said, I’d like to share a link to what might be my all-time favorite page in the WPILib docs… https://docs.wpilib.org/en/stable/docs/software/basic-programming/reading-stacktraces.html

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