Permalink
Browse files

Update examples/blink.js

added error output
  • Loading branch information...
1 parent 82496f5 commit 909fc3dcb23690b43e3ee3aab32f1f414e7d4268 @jgautier jgautier committed Aug 30, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 examples/blink.js
View
@@ -8,8 +8,11 @@ console.log('blink start ...');
var ledPin = 13;
var firmata = require('../lib/firmata');
-var board = new firmata.Board('/dev/tty.usbmodemfd121', function() {
-
+var board = new firmata.Board('/dev/tty.usbmodemfd121', function(err) {
+ if (err) {
+ console.log(err);
+ return;
+ }
console.log('connected');
console.log('Firmware: ' + board.firmware.name + '-' + board.firmware.version.major + '.' + board.firmware.version.minor);

0 comments on commit 909fc3d

Please sign in to comment.