Skip to content

Commit 4c3a85d

Browse files
authored
Merge pull request #3 from cederstrom/feature/active-low-support
Read activeLow config and initialize the Gpio button with this option
2 parents 832e462 + 95d8e49 commit 4c3a85d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

node_helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ module.exports = NodeHelper.create({
6969
intializeButton: function(index) {
7070
const self = this;
7171

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

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

0 commit comments

Comments
 (0)