@serialpilot/stream
v1.0.1
Published
Node.js Duplex Stream interface over a SerialPilot binding.
Maintainers
Readme
Node.js Duplex stream wrapper around any SerialPilot binding. The base class that SerialPilot extends — useful directly only if you want a stream over a custom binding.
Install
npm install @serialpilot/stream @serialpilot/bindings-cppUsage
import { SerialPilotStream } from '@serialpilot/stream'
import { autoDetect } from '@serialpilot/bindings-cpp'
const port = new SerialPilotStream({
binding: autoDetect(),
path: '/dev/ttyUSB0',
baudRate: 9600,
})
port.on('data', console.log)
port.write('PING\n')Most users want the higher-level serialpilot meta package instead.
