Skip to content

Commit

Permalink
Read activeLow config and initialise the Gpio button with this option
Browse files Browse the repository at this point in the history
  • Loading branch information
cederstrom committed Apr 17, 2017
1 parent 58f7acd commit 95d8e49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = NodeHelper.create({
intializeButton: function(index) {
const self = this;

var options = { persistentWatch: true };
var options = { persistentWatch: true , activeLow: !!self.buttons[index].activeLow};

var pir = new Gpio(self.buttons[index].pin, 'in', 'both', options);
pir.watch(this.watchHandler(index));
Expand Down

0 comments on commit 95d8e49

Please sign in to comment.