Skip to content

Instantly share code, notes, and snippets.

@richiejarvis
richiejarvis / seriallogger.js
Created December 21, 2019 12:32 — forked from yevgenko/seriallogger.js
Log all output from a serial port connection to a log file.
/*
Simple example that takes a command line provided serial port destination and routes the output to a file of the same name with .log appended to the port name.
usage: node logger.js /dev/tty.usbserial <baudrate>
*/
var SerialPort = require("serialport");
var fs = require("fs");
var port = process.argv[2];