Skip to content

Instantly share code, notes, and snippets.

@voodootikigod
Created June 1, 2011 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voodootikigod/1001785 to your computer and use it in GitHub Desktop.
Save voodootikigod/1001785 to your computer and use it in GitHub Desktop.
var sp = require("serialport")
serialport = sp.SerialPort;
var port = "/dev/tty.usbmodem621"; // Update with your port tty path
var serial_port = new serialport(port, {
baudrate: 9600,
parser: sp.parsers.raw
});
serial_port.on("data", function (data) {
console.log("new data");
console.log("here: "+data);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment