I just got the new REV Pneumatic Hub, and when I try deploying code using the compressor and solenoids it gives me this error.
Unhandled exception: edu.wpi.first.hal.util.AllocationException: Channels 7 and 8 already allocated
and Unhandled exception: edu.wpi.first.hal.util.AllocationException: Compressor already allocated.
You’re constructing your IntakeRelay in multiple places. Line 9 of IntakeCommand and Line 12 of RelayCommand. You can just keep the declarations there, and remove the new IntakeRelay() parts.
Problem fixed. It was with sensors, we were using a analog sensor when the code was for digital sensors, so we just wired in the digital sensor, and it works