phidgetapi
v2.3.1
Published
Full official phidget interface API for node.js
Downloads
6
Readme
Phidgets API for javascript!
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 :
Known supported platforms
- node.js
- io.js
- nw.js formerly node-webkit -> nw.js github
- atom electron formerly atom shell -> electron github
Phidgets
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.
Phidget Server Requirement
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
Installation
NPM
npm install phidgetapi
GIT
- git clone git://github.com/RIAEvangelist/node-phidget-API.git OR
- git clone https://github.com/RIAEvangelist/node-phidget-API.git
#Module Documentation
- Core Phidget Module
- Manager Module
- GPS Module
- InterfaceKit Module
- RFID Module
- Servo Module
- Spatial Module
- Analog Module
- Temperature Module
Quick Example
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();
ToDo:
- Support for Phidget authentication
- Create modules for handling all phidget types
- document all modules for various Phidgets
- Create more examples for various Phidgets
- Write tests for all phidget modules
Licensed under DBAD license
See the DBAD license in your language or our licence.md file.