A node.js and io.js based API for interacting with your own analog sensors and all official Phidget boards and sensors. This module is compatible with all operating systems which can run node.js or io.js. phidgetsapi is perfect for projects using BeagleBone Black and Raspberry Pi too!
npm info : See npm trends and stats for phidgetapi
GitHub info :
Phidget boards are a great prototyping tool which can handle digital inputs and outputs, along with a great array of analog sensors (RFID, temperature, accelerometer, servo motors etc). They make learning even easier and more fun than arduino. Prototyping is ridiculously easy with phidgets and the Phidget SBC, Beaglebone Black or Raspberry Pi.
This project assumes you have the Phidget server up and running for your OS. If you need to do that yet, you can check out the info for your system at one of these links.
For most "regular" (USB) Phidget boards, that assumes that the computer or SBC (BeagleBone Black, Raspberry Pi etc.) you have connected to the Phidget board via USB has the webservice up and running. For stand-alone Phidget micro-computers (phidgetsbc), this assumes you have configured the server via the web portal. You will be connecting to the Phidget server via TCP, so be sure you can access the server from the machine running this project.
If you are staring from the command line it will look something like this, you can add -v if you want to see some more verbose logging from the service.
Linux phidget webservice info
Mac phidget webservice info
sudo phidgetswbservice21
Windows phidget webservice info
PhidgetWebservice21
For a guide on installing the required libraries and services on your platform, see the below wikis
npm install phidgetapi
Please see the Module Documentation above for more info on specific phidget types.
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.phidget.connect();
See the DBAD license in your language or our licence.md file.