serialpilot
v1.0.1
Published
Node.js package to access serial ports. Linux, OSX and Windows. Welcome your robotic JavaScript overlords. Better yet, program them!
Downloads
9,655
Maintainers
Readme
The meta package — native bindings, stream wrapper, and every parser re-exported. Most projects only need this one.
Install
npm install serialpilotUsage
import { SerialPilot, ReadlineParser } from 'serialpilot'
const port = new SerialPilot({ path: '/dev/ttyUSB0', baudRate: 115200 })
const lines = port.pipe(new ReadlineParser({ delimiter: '\n' }))
lines.on('data', line => console.log(line))
port.write('PING\n')Discover ports with SerialPilot.list() or pin to a fingerprint with SerialPilot.findPorts({ vendorId: '2341' }).
See the full API and recipes at the SerialPilot docs.
