Permalink
Browse files

Merge pull request #47 from Pi-Uno/master

board.js updated to allow Raspberry Pi 'Arduino board' serial ports to b...
  • Loading branch information...
ecto committed Apr 14, 2014
2 parents b4c7610 + 05bd409 commit fbe78fc0bd96def013db9ac6cb5c73809d9f9117
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/board.js
View
@@ -12,7 +12,7 @@ var events = require('events'),
var Board = function (options) {
this.log('info', 'initializing');
this.debug = options && options.debug || false;
- this.device = options && options.device || 'usb';
+ this.device = options && options.device || 'usb|ttyACM*|ttyS0';
this.baudrate = options && options.baudrate || 115200;
this.writeBuffer = [];
@@ -73,7 +73,7 @@ util.inherits(Board, events.EventEmitter);
Board.prototype.detect = function (callback) {
this.log('info', 'attempting to find Arduino board');
var self = this;
- child.exec('ls /dev | grep "'+ self.device +'"', function(err, stdout, stderr){
+ child.exec('ls /dev | grep -E "'+ self.device +'"', function(err, stdout, stderr){
var usb = stdout.slice(0, -1).split('\n'),
found = false,
err = null,

0 comments on commit fbe78fc

Please sign in to comment.