Ok, to do some quick troubleshooting:
First, for my sanity, please add brackets
Code:
// Solenoid
if (mainStick.getRawButton(1))
{
spike.set(Relay.Value.kForward);
}
else {
if (mainStick.getRawButton(2))
{
spike.set(Relay.Value.kReverse);
}
}
If problem persists, comment out the code and use only
Code:
spike.set(Relay.Value.kForward);
If the spike LED is not solid Green, you have a wiring issue. Either your wire is bad or the spike is on the wrong port. If that does work, it becomes a code issue.