serial-websocket
v1.0.9
Published
Connects serial port to websocket
Downloads
12
Maintainers
Readme
serial-websocket
A bidirectional websocket to serial port server bridge. It can be used to send/receive commands into an Arduino or Raspberry Pi board through web.
- [x] Receives data from websocket and sends it into the serial port
- [x] Receives data from the serial port and sends it into the websocket
- [x] Supports multiple websocket connections
- [x] Arduino serial connection and Angular client example are provided
Installation
npm install serial-websocket --save
Usage
let options = {
serialPortName: "/dev/cu.usbmodem142301",
serialPortNameRate: 9600,
webSocketPortNumber: 8081
};
const serial_websocket = require("serial-websocket")(options);
serial_websocket.start();
Angular Client
An Angular client and Arduino demo code is provided here.
Logger
The logger used in this package is available separately in log-with-statusbar npm package