View Single Post
  #2   Spotlight this post!  
Unread 14-01-2008, 14:28
SamC SamC is offline
.
AKA: Sam Couch
FRC #0103 (Cybersonics)
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Philadelphia, PA
Posts: 583
SamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond reputeSamC has a reputation beyond repute
Re: Programming IR sensor

I got this from someone else, but this is how you would use the IR board to tell the robot to do something.

Code:
if (GetDigitalInput(1)){
doWhatever();
}
else if (GetDigitalInput(2)){
doSomethingElse();
}
change the number in GetDigitalInput to whatever to fit your needs. Good Luck!