|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
|||
|
|||
|
Re: Can't Get Compressor to Run
So when wiring the spike, what you need to do is Connect GND to black on PDB and 12v to red on PDB, make sure u use the smaller slots on the PDB. when you turn your bot on, your spike's led should be glowing orange-ish or red-ish.
(make sure your fuse isnt broken) then what you need to do is connect the 3pin cable from the relay ports on the digital sidecar to the spike. relay ports are the ones next to the phone jack and right under the DIO ports. On the spike, it has a B which means the black of the PWM cable goes on it. or what ever color ur GND is. now coding wise, we used the Relay class our code looked like: Code:
if(forward == true)
{
spike.set(Relay.Value.kOn);
spike.set(Relay.Value.kForward);
}
else if (reverse == true)
{
spike.set(Relay.Value.kOn);
spike.set(Relay.Value.kReverse);
}
if(!forward && !reverse)
{
spike.set(Relay.Value.kOff);
}
If that is working, then wire the compressor to the spike, Red to M+ and black to M- and get rid of the code that lets the relay go reverse. And then when you turn on the bot, the relay should start. Let me know if this helps |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|