File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ var events = require('events'),
1212var Board = function ( options ) {
1313 this . log ( 'info' , 'initializing' ) ;
1414 this . debug = options && options . debug || false ;
15- this . device = options && options . device || 'usb' ;
15+ this . device = options && options . device || 'usb|ttyACM*|ttyS0 ' ;
1616 this . baudrate = options && options . baudrate || 115200 ;
1717 this . writeBuffer = [ ] ;
1818
@@ -73,7 +73,7 @@ util.inherits(Board, events.EventEmitter);
7373Board . prototype . detect = function ( callback ) {
7474 this . log ( 'info' , 'attempting to find Arduino board' ) ;
7575 var self = this ;
76- child . exec ( 'ls /dev | grep "' + self . device + '"' , function ( err , stdout , stderr ) {
76+ child . exec ( 'ls /dev | grep -E "' + self . device + '"' , function ( err , stdout , stderr ) {
7777 var usb = stdout . slice ( 0 , - 1 ) . split ( '\n' ) ,
7878 found = false ,
7979 err = null ,
You can’t perform that action at this time.
0 commit comments