Numato Lab 32 Channel USB Gpio NodeJS Module

Having played with the Raspberry PI GPIO interface for over a year, I thought I should explore options for a faster CPU/RAM and a different architecture to enable quicker device control and more complex software. The fastest option for controlling is using a standard PC and a standard CPU architecture.

After some research, I found this USB controlled GPIO module from Numato Lab:
http://numato.com/32-channel-usb-gpio-module.html

It connects to your PC using a standard USB cable, and reveals itself as a serial device which routes GPIO commands between your application and pins. After research on how to use it with NodeJS I found Numato’s sample – it relies on the “serial” NodeJS module, which sends asynchronous commands to a serial port, resulting in a callback nightmare.

Below is code written to allow synchronous use of this device, with NodeJS and Linux:
https://github.com/fgheorghe/NumatoLab32ChannelUSBGPIOModule

This enables a clear command flow to and from the device.

Posted in DIY