Skip to content

Commit fbe78fc

Browse files
committed
Merge pull request #47 from Pi-Uno/master
board.js updated to allow Raspberry Pi 'Arduino board' serial ports to b...
2 parents b4c7610 + 05bd409 commit fbe78fc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/board.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var events = require('events'),
1212
var 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);
7373
Board.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,

0 commit comments

Comments
 (0)