Skip to content

Instantly share code, notes, and snippets.

@thebadger412
Created December 29, 2012 19:25
Show Gist options
  • Save thebadger412/4408821 to your computer and use it in GitHub Desktop.
Save thebadger412/4408821 to your computer and use it in GitHub Desktop.
node serial 1
/**
* Serial Port Setup.
*/
var portName = '/dev/ttyAMA0'; //This is the standard Raspberry Pi Serial port
var readData = ''; //Array to hold the values read in from the port
var sp = new serialport(portName, {
baudRate: 9600,
dataBits: 8,
parity: 'none',
stopBits: 1,
flowControl: false
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment