Quote:
Originally Posted by Alan Anderson
"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.