Compresser Wiring Help

I need help in wiring the compresser and the pressure switch so it will work the way it is intended. Me and a few others on my team have a few different ideas on how to wire them but we don’t know if any of them will work.

Thanks in advance.

You have to hook the pressure switch back to the Robot Controller. DO NOT HOOK IT IN SERIES WITH THE COMPRESSOR

Use a PWM Cable cut off the male end and wire the Ground and Signal Wires to the pressure switch (doesn’t matter which terminal on the pressure switch). Then you can plug the female end into a digital input on the controller

For the Compressor hook it up to a Spike Relay

compressor > spike
pressure switch > digital in


Edit: Programming line: relayX_fwd = !rc_dig_inXX;
Replace X and XX with the port number