View Single Post
  #2   Spotlight this post!  
Unread 30-01-2013, 12:29
FTC6389's Avatar
FTC6389 FTC6389 is offline
FTC Team #6389
FTC #6389 (The Flaming Unicorns)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2009
Location: Eden Prairie Minnestoa
Posts: 13
FTC6389 is an unknown quantity at this point
Re: [FTC]: IR Code With Two Sensors

Think about using logical "and" and "or" in your "if" statements. I could do it for you and post the solution, but figuring it out yourself will help you learn. Here is an example...

if(Condition1 && Condition2) // "&&" = "and"
{
DoSomething();
}
else
if(Condition3 || Condition4) // "||" = "or"
{
DoSomethingElse();
}
else
{
DoDefaultAction();
}



-----
FTC Team #6389
Reply With Quote