Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Has anyone ever worked with phidgets?

  1. Sep 21, 2007 #1

    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?

  2. jcsd
  3. Sep 23, 2007 #2
    Hi Scott,

    The digital outputs are documented in the product manual for the 0/16/16 (PN 1012)

    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.

  4. Sep 23, 2007 #3

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

  5. Sep 24, 2007 #4
    I recommend starting with a few 'hello worlds' before getting into using Phidgets.

  6. Sep 24, 2007 #5
    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.
  7. Sep 24, 2007 #6
    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)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook