Sand500, for the compressor, you really shouldn't use your own code for controlling the spike...WPILIB has built in methods handling the compressor. You should be doing something like:
Code:
Compressor compressor = new Compressor(pressureswitch INT, relay INT);
Then in robotInit:
Code:
compressor.start();
And your done. It handles all the safety hierarchies and controls the compressor based on the pressure switch which you MUST have in order to compete.
Correct any parts if they look incorrect anyone.