JamesBarwell / rpi-gpio.js

Control Raspberry Pi GPIO pins with node.js
MIT License
657 stars 116 forks source link

Is there a way with the GPIO utility when exporting a pin to DIR OUT, it comes in high value? #66

Closed lwaclawiak closed 5 years ago

lwaclawiak commented 7 years ago

Is there a way with the GPIO utility when exporting a pin to DIR OUT, it comes in high value?

I saw that this has been fixed for the rpi-gpio.js library, but with the utility this remains unsolved.

I program my scripts with bash, and use a bank of relays that are fired as soon as I export the pins as out.

The same thing happens if I send by bash the value "out" to the direction file of the pin.

Thanks!

pricemi115 commented 5 years ago

This bug seems quite old (and not a problem....or no longer a problem, anyway). I just started playing with rpi-gpio and do the same thing without a problem in the current version (v2.1.3). For anyone else having this same question, simply use DIR_HIGH as the direction. DIR_OUT and DIR_LOW are equivalent.

JamesBarwell commented 5 years ago

Thanks for following up on this. You're right, it was probably broken or undocumented when this was raised. I'll close it now as it seems clear in the documentation that this is how it works.