Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seymar/serial-device
A node module build on top of serialport adding some handy features
https://github.com/seymar/serial-device
Last synced: 18 days ago
JSON representation
A node module build on top of serialport adding some handy features
- Host: GitHub
- URL: https://github.com/seymar/serial-device
- Owner: seymar
- Created: 2016-12-10T15:45:35.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-10T17:48:34.000Z (about 8 years ago)
- Last Synced: 2024-04-29T00:43:13.937Z (9 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/serial-device
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes.md
Awesome Lists containing this project
README
# serial-device
A node module build on top of [serialport](http://npmjs.org/package/serialport) adding some handy features like:
* Auto re-open when a device is plugged in
* Event firing when a new line is received## Example
```javascript
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`