diff --git a/plugins/rgblights/index.js b/plugins/rgblights/index.js index d5d08aa..316f0b1 100644 --- a/plugins/rgblights/index.js +++ b/plugins/rgblights/index.js @@ -22,6 +22,15 @@ define([ 'duino' ], function(duino) { this.id = this.name.toLowerCase(); this.board = new duino.Board(); + function warnNoDuino(e) { + console.warn("[WARNING] error while trying to connect to Arduino:") + console.warn(" >>> " + e); + console.info("[INFO] continuing and hoping for the best..."); + // FIXME: we should disable this plugin in some way, though + } + this.board.on('error', warnNoDuino); + this.board.setup(); + this.pins = {}; this.pluginHelper = app.get('plugin helper');