Has anyone ever worked with phidgets?

  • Thread starter Thread starter scott_alexsk
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 4K views
scott_alexsk
Messages
335
Reaction score
0
Hi,

I am going to be use a 0/16/16 phidget for a 'seemingly' simple task which amounts to just turning off and on an output at different rates (duty cycle), for different amounts of time. Firstly I was curious where I should install the phidget java library, on my computer, b/c it is not mentioned anywhere clearly. Also, I have seen only a few examples of code, and the exact commands concerning this particular phidget are not that obvious. The section for examples with inputs and outputs on the actual phidget site is still under construction. Does anyone know where I might get some better examples, or know anything relating to phidgets that might be useful to know?

Thanks,
-Scott
 
Physics news on Phys.org
Hi Scott,

The digital outputs are documented in the product manual for the 0/16/16 (PN 1012)
http://www.phidgets.com/documentation/Phidgets/1012.pdf

Java does not specify where libraries are installed. You unzip the java library wherever you want, and specify it's location to the java interpreter when you run the program.

Chester
 
Thanks,

So how would I specify it? I am very new to programming.

-Scott
 
I recommend starting with a few 'hello worlds' before getting into using Phidgets.

Chester
 
No, I already have taken a very good course in java. I just need to know how to tell java where the library is, that is all I am asking.
 
If you unzip the JavaJNI zip file downloaded from Phidgets.com to some directory, you can unpack the library in the same directory with -

> jar xf Phidget21.jar

You can then compile one of the simple examples -
> javac ManagerExample.java
And execute it -
> java ManagerExample
Phidget21 - Version 2.1.2 - Built Sep 7 2007 12:55:53
Press any key to exit...
attachment of PhidgetInterfaceKit v824 #1000012 (attached)
detachment of PhidgetInterfaceKit v824 #1000012 (unattached)