function listSerialPorts(){
	var availSerialPorts = [];
	// list serial ports:
	serialport.list(function (err, ports) {
	  ports.forEach(function(port) {
	    console.log(port.comName);
	    availSerialPorts.push(port.comName);
	  });
	});
}
// List all serial ports connected to computer
List all serial ports connected to computer
List all serial ports connected to computer
function listSerialPorts(){
	var availSerialPorts = [];
	serialport.list(function (err, ports) {
	  ports.forEach(function(port) {
	    console.log(port.comName);
	    availSerialPorts.push(port.comName);
	  });
	});
}
function listSerialPorts ( ) { var availSerialPorts = [ ] ; serialport . list ( function ( err , ports ) { ports . forEach ( function ( port ) { console . log ( port . comName ) ; availSerialPorts . push ( port . comName ) ; } ) ; } ) ; }
List all serial ports connected to computer
List all serial ports connected to computer
// list serial ports: