make pin optional

This commit is contained in:
Shannon Sterz 2016-01-30 19:15:43 +01:00
parent 84559145e8
commit 63d6213285

View file

@ -3,7 +3,7 @@
var RC = function (arduino, pin) { var RC = function (arduino, pin) {
if(!arduino){throw new Error('Arduino must be set');} if(!arduino){throw new Error('Arduino must be set');}
this.arduino = arduino; this.arduino = arduino;
this.pin = pin; this.pin = pin && pin || 11;
} }
RC.prototype.send = function(tristate) { RC.prototype.send = function(tristate) {