JamesBarwell / rpi-gpio.js

Control Raspberry Pi GPIO pins with node.js
MIT License
658 stars 115 forks source link

Need a way to specify use of internal pullup/pulldown resistors for GPIO pins #44

Closed 2sk21 closed 7 years ago

2sk21 commented 7 years ago

There does not seem to be any way to specify the use of the internal pulp/pulldown resistors in the code - or have I missed something? I did see a way to do this in the Python RPi library.

seymar commented 7 years ago

Same problem here

JamesBarwell commented 7 years ago

This is already being discussed in here: https://github.com/JamesBarwell/rpi-gpio.js/issues/25

There is an outstanding PR (https://github.com/JamesBarwell/rpi-gpio.js/pull/35) that should address this in a forthcoming version.

pwnate commented 7 years ago

I don't believe #25 or PR #35 address this issue. The internal pullup/pulldown resistors are for direction in and not direction out. The issue/PR address initializing the direction out. There's a thread about this here.

JamesBarwell commented 7 years ago

Apologies, I had quite a few issues to close off a result of landing that patch, and I misunderstood this when I gave my previous response. Thanks for the link to the stackexchange discussion.

I think, given what nmaas87 says on that discussion, this isn't something that should be in-scope for this module. nmaas87 is correct that this module is just providing bindings around the /sys path that controls the pins. If it can't be done through there then it's not something I want to support.