Hi all! We have a CANSparkMax attatched to our wheel intake called “wheelMotor”. This motor is called by a simple whenHeld button that executes a method which just turns on the motor (.set(0.85)). However, the motor will only turn on for a couple seconds before the robot disables itself and the driver station reads no comms and no code. We ran it on the Rev client and the libraries are up to date and we reflashed the RIO as a precaution. Additionally, we put in a different CANSparkMax motor into wheelMotor’s place and it worked fine (though of course where that motor is on the robot). We are completely lost on the problem, any help is appreciated.
The relevant classes are: RobotContainer, Constants, IntakeCommand, IntakeSubsystem.
LMK if there is anything I can do to help you out!
Quick Edit: Forgot to mention that if we reenable the motor will turn on without input and disable the robot again, we need to powercycle in order to fix this.
We do not use I2C sensors, the connection answers seem like the most likely culprit. This motor is relatively far from our roboRIO. Thanks for the tip! I will update this post if it works (and if it doesn’t I suppose)