View Single Post
  #6   Spotlight this post!  
Unread 15-02-2013, 21:31
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Mentor, LRI, MN RPC
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,813
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Compressor Issue

Don't try my code above - that was an example of what could be causing your problem. Instead, you should have code like this:

Code:
If (pressureSwitch)
{
    Relay.set(kForward);
}
Else
{
    Relay.set(kOff);
}
Note the difference between this and the code I posted above - above, the code would stop it, then start it every single time we read the value of the pressure switch. With this code, it will either star it or stop it, but can never do both at once.
__________________
2007 - Present: Mentor, 2177 The Robettes
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016; Galileo 2016; Iowa 2017
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA