Kiosk Project logo

KioskBrowser/PhidgetControler

KioskWiki | KioskBrowser | RecentChanges | Preferences

Phidget controler 8/8/8 xpcom mozilla component

:-* An xpcom component for mozilla based products that lets the browser read analog sensors and control digital outputs. Great for things like sensing when someone is near and taking a given action like loading a cerain url or turning something on/off via the digital outputs

:-* The nsIPhidget xpcom component is distributed and implemented in the phidgetcontroler.xpi. You can get this firefox(linux) addon here: [phidgetcontroler.xpi]

This extension is used by typing

chrome://phidgetcontroler/content/phidgetcontroler.xul
in the firefox url bar and the phidgetscontrol page will be displayed.

An alternative is to start the phidgetcontroler standalone. To start the phidgetcontroler standalone, from the commandline :

firefox -chrome chrome://phidgetcontroler/content/phidgetcontroler.xul

nsIPhidget xpcom component Usage

From javascript:
 var nsIPhidget = new Object();
 nsIPhidget = Components.classes["@mozilla.org/Phidget;1"].createInstance(Components.interfaces.nsIPhidget);
 nsIPhidget.phidgetAttach(sensitivity);
 var deviceInfo = nsIPhidget.pDeviceName +"\n"
        + "Serial Number: " + nsIPhidget.pSerialNum +"\n"
        + "Version Number: " + nsIPhidget.pVersion +"\n"
        +"Library: " + nsIPhidget.pDeviceLibrary +"\n";

Of course please refer to the phidgetcontroler.xul from the phidgetcontroler.xpi as all implemented methods of nsIPhidget are used there.

:-* Here is a screen shot of the standalone phidget controler. It has two analog controls attatched, ir sensors. Note that the sensor id 3 was the last to have a change in value.


KioskWiki | KioskBrowser | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited January 8, 2010 5:20 pm (diff)
Search: