From ad6deae91c0c56e23b93d05d56342333b8842cc9 Mon Sep 17 00:00:00 2001 From: Kevin Gage Date: Thu, 16 Jul 2015 19:09:33 -0400 Subject: [PATCH] edited comments in ledController to represent the new changes. Also changed from writeSync to write --- ledController.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ledController.js b/ledController.js index cf5c425..154307b 100644 --- a/ledController.js +++ b/ledController.js @@ -25,19 +25,20 @@ var SetState = function (pinNumber, ledState) { led.unexport(); } else{ - led.writeSync(1); + led.write(1); } } /* -This function is called with two arguments. All arguments except for the last one should be a java object which contains a delay and -at least one pin:state pair. +This function is called with two arguments. The first argument should be an array of java objects +each of which contains a delay and at least one pin:state pair. each gpio pin represents a connection to a LED exampe: {delay: value, gpio#: bool, gpio#: bool} -The final argument should be a callback function that takes one argument. The callback function will be passed an error message if an error occurs +The second argument should be a callback function that takes one argument. +The callback function will be passed an error message if an error occurs -example LED({delay: 0, 1: true, 2: true, 3: true}, {delay: 5, 1: false, 2: false}, function(er){console.log(er)}) +example LED([{delay: 0, 1: true, 2: true, 3: true}, {delay: 5, 1: false, 2: false}], function(er){console.log(er)}) */ var LED = function(ledInstructions, cb) {