Skip to content

Instantly share code, notes, and snippets.

@bcomnes
Created March 5, 2014 23:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save bcomnes/612e2981d1f93fb7abbd to your computer and use it in GitHub Desktop.
node sudo hardware code
devices = {
devArduino: {
port: '/dev/tty.usbserial-A800ewsy'
function: 'stage'
},
stageArduino: {
port: '/dev/tty.usbmodem3d11',
function: 'stage'
},
scopeSerial: {
port: '/dev/tty.PL2303-0000101D',
function: 'scope'
}
}
serialport.list(function (err, ports) {
ports.forEach(function(port) {
// port.comName: '/dev/tty.PL2303-0000101D'
// If port.comName exists in the port key of one of the devices
// Set up that particular device
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment