|
Re: Limit switch not working properly.
class RobotDemo : public SimpleRobot
{
DigitalInput *switch1;
}
public:
RobotDemo(void):
{
switch1 = new DigitalInput(4,2);//4 is the modual in cRio and 2 the input port
}
that is initializing it but you need to do the rest. you will get a 1 or 0 and need to declare a bool variable to take the number from it in the form
variable = switch1->Get();
or
use switch1->Get() in your conditional
hope it helps
|