View Single Post
  #3   Spotlight this post!  
Unread 21-02-2004, 21:18
Robert Hafner's Avatar
Robert Hafner Robert Hafner is offline
FIRST Alumni
no team
 
Join Date: Mar 2003
Rookie Year: 2000
Location: Springfield. MA
Posts: 34
Robert Hafner is on a distinguished road
Send a message via AIM to Robert Hafner Send a message via MSN to Robert Hafner Send a message via Yahoo to Robert Hafner
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
}
Reply With Quote