|
Re: Wiring the photosensors (Rockwell)
Well, I think we tried that. that may mean that the problem lays in the programming.
Usining java, you get to them with the DigitalInput class, right?
can someone tell me if this looks right for making a command be executed whenever three cameras are set off?
DigitalInput camera1, camera2, camera3;
InternalButton button1;
public OI(){
camera1 = new DigitalInput(1);
camera2 = new DigitalInput(2);
camera3 = new DigitalInput(3);
boolean C1 = camera1.get();
boolean C2 = camera2.get();
boolean C3 = camera3.get();
if (C1 && C2 && C3){
button1.setPressed(true);
} else {
button1.setPressed(false);
}
button1.whenPressed(new ThreeCameras());
}
|