View Single Post
  #6   Spotlight this post!  
Unread 28-01-2010, 20:06
wywern209 wywern209 is offline
Registered User
FRC #2202
 
Join Date: Jan 2009
Location: brookfield,WI
Posts: 4
wywern209 is an unknown quantity at this point
Re: Spike relay code not working

bool trigger= stick.GetRawButton(3);
float potentiometerreading= potentiometer.GetAngle();
if(trigger)
{
fan.Set(Relay::kForward);
}
if (potentiometerreading>0)
{
fan.Set(Relay::kOn);
}

----------
Here is the code we have right now. Our mentor is wondering if we should have used digital output instead of the relay.