View Single Post
  #3   Spotlight this post!  
Unread 08-04-2010, 15:15
krudeboy51's Avatar
krudeboy51 krudeboy51 is offline
Only Programmer
AKA: kory
FRC #0369 (369)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2010
Location: brooklyn
Posts: 151
krudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of lightkrudeboy51 is a glorious beacon of light
Send a message via AIM to krudeboy51
Re: INFRARED SENSORS

Quote:
Originally Posted by Alan Anderson View Post
"Programming" an input is just a matter of reading its value and testing it to decide what the program should do. What do you want the program to do?
i want when the infrared sensor is interrupted the robot stops, i declared in class and in public as a digital input, but i dont know how to write a code for it, all i have is:

Quote:
class:
DigitalInput *InfraredSensor;
public:
InfraredSensor = new DigitalInput(1);
void Autonomous:
if (InfraredSensor->????())
{
myRobot->Set(0.0);
but i dont know what to put where the question marks are.
Reply With Quote