Quick question

Comments & issues
amelton
Fresh meat
Posts: 1
Joined: Tue Feb 05, 2013 6:19 pm
Contact:

Quick question

Postby amelton » Tue Feb 05, 2013 6:56 pm

Why doesn't this work?

Code: Select all

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

public class LED_Blink
{
   public static final void main() throws Exception
   {
      InterfaceKitPhidget ik;

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

      ik = new InterfaceKitPhidget();
      
      ik.setOutputState(0, true);
      Thread.sleep(5000);
      ik.setOutputState(0, false);
      Thread.sleep(5000);
      ik.setOutputState(0, true);
      Thread.sleep(5000);
      ik.setOutputState(0, false);
      Thread.sleep(5000);
      ik.setOutputState(0, true);
      Thread.sleep(5000);
      ik.setOutputState(0, false);
      Thread.sleep(5000);
   }
}


All I am trying to do is blink an LED on and off a few times.

On the stderr output I get the following message
"Couldn't find Main-Class attribute in LED_Blink.jar Manifest."

Also is there a link to some more project examples (excluding the ones provided by phidgets) I can't seem to find anything. I am using the 1070 SBC with only the onboard interface kit.

Any help is appreciated.
Thanks

User avatar
burley
Human-Cyborg Relations
Posts: 441
Joined: Tue Sep 27, 2011 2:37 pm
Location: Calgary
Contact:

Re: Quick question

Postby burley » Wed Feb 06, 2013 8:48 am

You never open the Interface Kit. You need to open it before you can start making calls or it won't do anything:

Code: Select all

ik.open();
ik.waitForAttachment();
Brian Burley
403-282-7335 ext. 6003
support@phidgets.com


Return to “General”

Who is online

Users browsing this forum: No registered users and 2 guests