Closed japita-se closed 6 years ago
It's required so that the module does not conflict with any process that might be using the /sys
interface. You need to unexport the pins via /sys
first, so that the gpio state cannot be corrupted.
Uhm... can you tell me how to unexport? Because, if I comment that function everything works. g
You echo the pin number to the /sys/class/gpio/unexport
control file. Pins are not exported by default, so something on your system has enabled them without disabling them again afterwards, hence the conflict. You can read more about the sysfs interface here https://www.kernel.org/doc/Documentation/gpio/sysfs.txt
This module uses a different interface to control the pins, which is why we bail out if the sysfs interface is in use. While it may happen to work ok by commenting out the check, it's only due to pure luck. You can't use both interfaces simultaneously and expect things to work correctly.
Ok, thank you very much for your help
I think this function is not necessary in rpio.js
function check_sys_gpio(pin)
In fact, in RPI3 + nodejs 8 we can't use rpio. If I comment that function all is fine.