|
Re: Pressure switch code
Let me see what I can do. . .
Our pressure switch code is wicked simple:
The pressure switch is on digital input 8, and the compressor is on relay 8.
in the initialization routine
relay8_fwd = 1; //Start with compressor on
In the default routine:
if(!rc_dig_in18)
{
relay8_fwd = 1; // If low air pressure, turn on
}else{
relay8_fwd = 0; // If high air pressure, turn off
}
|