Created
June 1, 2011 04:29
-
-
Save voodootikigod/1001785 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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