Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.91 KB

Manager.md

File metadata and controls

41 lines (28 loc) · 1.91 KB

#Phidget Manager

The Phidget Manager library makes for an intuitive and easy way to manage your Phiget devices. For a quick start into your Manager project see the Getting Started section or jump to this Basic Manager Example.

##Methods

Method call Parameters Description
connect phidget.params object Connects any Phidget USB Device
quit N/A This method requests a disconnect from the Phidget board. The disconnected event will be dispatched when the connection has been successfully disconnected.
observe change handler function used for asynchronously observing the changes to any Phidget USB device.
unobserve change handler function Stops observing from the specified observe's change handler function.

##Data

Key Data Type Writable Description
type string no 'PhidgetManager'

##Getting Started

Initializing and identifying any Phidget Device can be very easy, here is a basic example to help you get started.

var Manager = require('phidgetapi').Manager;

var manager=new Manager;

manager.observe(update);

function update(changes){
    for(var i in changes){
        var change=changes[i];
        //see specific info about each phidget
        //console.log(change);
    }

    //see latest info on all available phidgets
    console.log(manager.devices);
}

manager.connect();