Pneumatics Java Code Not Working

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:

Here’s our code and our pneumatics class:


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.

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:

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