0.0.3 • Published 7 years ago

serial-device v0.0.3

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

serial-device

A node module build on top of serialport adding some handy features like:

  • Auto re-open when a device is plugged in
  • Event firing when a new line is received

Example

var SerialDevice = require('serialdevice');
var hub = new SerialDevice({
  comName: '/dev/cu.usbmodem12341',
  serialOptions: { // Options passed to serialport module
    baudrate: 115200
  },
  lineEnding: '\r\n' // Default: \n
});
hub.on('line', function(line) {
	console.log(line);
}
hub.send(new Buffer('data\n'));

Installation

npm install serial-device

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago