Hey all,
My team and I are trying to use our pneumatics. Only problem is none of it is working. When I try to run our code, we get a bunch of errors and stuff: https://pastebin.com/zyZKUPTf
Here’s our Robot.java code and our pneumatics class:
Robot.java: https://pastebin.com/3BQGuWM7
Pneumatics: https://pastebin.com/csHkhfCf
ANY HELP IS HUGELY APPRECIATED!!!
Chik3r
February 16, 2019, 2:18am
2
Is your PCM on? Is your compressor correctly wired up? Is your PCM connected to CAN?
With regard to your code, you rarely need to instantiate a compressor object. See the javadoc for the Compressor class.
The PCM will automatically run in closed loop mode by default whenever a Solenoid
object is created. For most cases, a Compressor object does not need to be instantiated or used in a robot program. This class is only required in cases where the robot program needs a more detailed status of the compressor or to enable/disable closed loop control.
Just instantiate your Solenoid or DoubleSolenoid and your compressor should start working in closed-loop mode.
1 Like
Using Phoenix Tuner, can you confirm that the PCM is present, has the latest firmware and has a device ID of 0.
Also, maybe I misread, most of your code, including pneumatics, is commented out?
Also, make sure you have read and followed the Phoenix Documentation, especially for the PCM:
https://phoenix-documentation.readthedocs.io/en/latest/ch09_BringUpPCM.html
system
Closed
February 16, 2020, 12:28pm
6
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.