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.