Quote:
Originally Posted by ksafin
We're using the spike relay between our PDB and Compressor, and trying to turn it on by switching the relay to on or off.
By default, when we turn the robot on, the relay doesn't allow the current to flow and power the compressor.
To allow it to do so, and for the compressor to turn on, do we set the relay to kOn or kOff?
|
There is a class called compressor... it does this for you.
Code:
Compressor compressor = new Compressor(1,2); // 1 is your relay port and 2 is your pressure switch digital input
//then in your robot init just put
compressor.start();