On NodeJS and Phidgets

node.js phidgets 
Sat Jan 14 2012

For those of you who don’t know what Phidgets are, they are small robotic prototyping boards which can handle (binary) input and output, along with a collection of analog sensors for temperature, rfid, light, etc. I’ve been using them since graduate school and they are really fun to work with. A "Normal" Phidget requires a computer, as it is a USB device. There are drivers for most operating systems now, and the most common method of interaction is via C++ of Java extensions on the local machine that hosts the USB port.

Recently, they have also included a web-service (sockets) which can be used to talk to the Phidget board. This method of connection has a much higher latency than direct C++ bindings, but I find that for most of the use cases I have, it works just fine (push a button, sense something at some frequency, etc). So I thought to myself: Why not connect Phidgets to NodeJS?

Here is the result [github] & [[npm]]

This package will expose a data object to your application which can be used to periodically poll state of the inputs, and events will fire which you can choose to listen for phidgets.on("data"). There are methods which handle connecting and changing the state of the outputs as well. Enjoy!

Hi, I'm Evan

I write about Technology, Software, and Startups. I use my Product Management, Software Engineering, and Leadership skills to build teams that create world-class digital products.

Get in touch