Skip to content

Commit

Permalink
Merge pull request #3 from cederstrom/feature/active-low-support
Browse files Browse the repository at this point in the history
Read activeLow config and initialize the Gpio button with this option
  • Loading branch information
Jopyth authored Jun 10, 2017
2 parents 832e462 + 95d8e49 commit 4c3a85d
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 @@ -69,7 +69,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 4c3a85d

Please sign in to comment.