Page 1 of 1

waitForAttachement hangs

Posted: Fri Jun 10, 2011 1:22 pm
by winter
Hello,

The waitForAttachement never returns for me. Please check the following code:

package com.securekey.qa;

import com.phidgets.*;
import com.phidgets.event.*;

public class Test{
public static final void main(String args[]) throws Exception {
ServoPhidget motor;

System.out.println(Phidget.getLibraryVersion());

motor = new ServoPhidget();
motor.openAny();
System.out.println("waiting for MotorControl attachment...");
motor.waitForAttachment();
}
}

Re: waitForAttachement hangs

Posted: Fri Jun 10, 2011 1:54 pm
by winter
After I closed the Phidget Control Panel, the problem is gone.

Re: waitForAttachement hangs

Posted: Thu Jan 26, 2012 11:56 am
by rsabine
I just got my 1066 advanced servo controller and HS-485HB servo in the mail today. The Phidget Control Panel works just fine but I can't seem to any JAVA programs to get past the

servo.openAny();
System.out.println("waiting for Servo attachment...");
servo.waitForAttachment();


my console just sticks with this message:

Phidget21 - Version 2.1.8 - Built Jan 23 2012 10:51:57
waiting for Servo attachment...

I have tried Eclipse and NetBeans with and without the control panel...

Re: waitForAttachement hangs

Posted: Thu Jan 26, 2012 1:04 pm
by Patrick
Do you still have the phidget opened from the control panel example?

-Patrick

Re: waitForAttachement hangs

Posted: Thu Jan 26, 2012 2:57 pm
by rsabine
Yes and no... I have tried to run the java program with the control panel running in my tray and with out it running. Which should it be? I have not found any instruction that says I should close it except a mention that the local machine can only have one open control.

Do you think there is another thing running that might effect the java program that does not effect the control panel program?

Re: waitForAttachement hangs

Posted: Thu Jan 26, 2012 5:09 pm
by rsabine
Sorry, i was inattentive. I tried ServoExample.java, not the AdvancedServoExample.java.