My team has wired an regular AndyMark compressor to REV Pneumatics Hub. I’m copy-pasting some code I wrote last year, and making some small modifications
At the top of my Robot class I declared the Compressor
private Compressor compressor = new Compressor(PneumaticsModuleType.REVPH)
And then in robotInit() I enable the compressor
compressor.enableDigital()
however, as the title says, the compressor doesn’t run.
I tried a few other things, like using PneumaticHub class instead, but I’ve had no success.
There must be a step that I’ve missed or done wrong. Any help is greatly appreciated.
Have you wired the pressure switch into the hub as well? I believe the system requires the switch by default. (In addition to the robot being enabled.)
Agreed with @drewwhis. The PH/PCM compressor control will default to off is the pressure switch input is open/disconnected.
If the switch isn’t wired, you should definitely do that. But in the meantime, you can test it by manually shorting the switch pins together using a wire, 2-pin jumper, or pliers (but don’t bend the pins).
If that still doesnt work, please share your code in full, preferably as a link to github or similar.
From the pictures it looks like there is a Digital switch wired into the system currently. It’s easier to see where it’s wired in the second picture. The switch itself is visible in the first picture.
My next suggestion would be to short the contacts on the switch with a screwdriver contacting both posts on the switch to see if it turns on after that. Same as jumping it without the switch put in.
How are you terminating your CAN bus? it looks like you have something wired to it after the Power Distribution Panel. What position is the jumper on the PDP in?
Are you getting any CAN errors on the driver station?
With the robot enabled, have you tried jumping the switch pins on the PH or shorting the screw terminals on the pressure switch?
I booted up the REV Hardware client and connected to the PCM via USB-C, it turns out there was some misconfiguration and an incorrect CAN ID, I have fixed those errors and everything works as expected now!