Skip to content

harmon25/node-usb-barcode-scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-usb-barcode-scanner

Package to help work with USB HID based barcode scanners in nodejs on Linux and OSX.

Does not work on Windows

Usage

var usbScanner = require('../usbscanner').usbScanner;
var getDevices = require('../usbscanner').getDevices;

//get array of attached HID devices
var connectedHidDevices = getDevices()

//print devices
console.log(connectedHidDevices)

//initialize new usbScanner - takes optional parmeters vendorId and hidMap - check source for details
var scanner = new usbScanner();

//scanner emits a data event once a barcode has been read and parsed
scanner.on("data", function(code){
	console.log("recieved code : " + code);
});

About

Package to help work with USB HID based barcode scanners in nodejs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published