InterfaceKit Phidget InterfaceKit

This element allows you access to  PhidgetInterfaceKit devices, I/O boards with digital inputs, digital outputs and/or analog outputs., like devices 1010, 1011, 1012, 1018, 1019 and 1203. 

The analog inputs are used to measure continuous quantities, such as temperature, humidity, position, pressure, etc. The digital outputs can be used to drive LEDs, solid state relays, transistors; in fact, anything that will accept a CMOS signal. The digital inputs can be used to convey the state of devices such as push buttons, limit switches, relays, and logic levels.

With this element, you can access to the module directly (with the serial number) or through the network, using the WebService of the phidget's driver  in a remote computer with the phidget Interfacekit connected (here, you need the IP, port and password too).

Usage

To use any Phidget element, drag an drop its icon to the list of model elements of your model. Then, edit the connection parameters and invoke phidget.connect() in your code.

All methods returning a boolean will return true on successful completion of the command, false otherwise. Methods returning a double value will return Double.NaN if there is any error when connecting to the phidget.

Available method for this group of phidgets include:

Example of use

// Init the module
myInterfaceKit.connect();
// Some values on digital outputs
myInterfaceKit.setDigitalOut(7, true);
myInterfaceKit.setDigitalOut(1, !myInterfaceKit.getDigital(6));
// Reading sensors
Sensor0 = myInterfaceKit.readAnalogSensorValue(0)); // value from 0 to 1000
Sensor1 = myInterfaceKit.readAnalogADValue(0)); // More precision, value from 0 to 4095