JamesBarwell / rpi-gpio.js

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

'gpio.on' binding not working on PI2 #26

Closed hadesara closed 9 years ago

hadesara commented 9 years ago

I am trying out this library and I am not unable to follow the examples since the callback functions to gpio.on 'change' and 'export' are not being triggered. I notice that RPI2 is not mentioned anywhere on this repo. Do you support RPI2 ?

julienvincent commented 9 years ago

Duplicate of issue #2

The RPi 2 is supported, however in the current master branch of this module, change listeners do not fire. We are busy implementing a new change listener which should be coming to master quite soon. So long you can use my working fork which is hardware tested and functioning.

julienvincent commented 9 years ago

This issue has been fixed.

hadesara commented 9 years ago

Awesome! Thank you. Referring to your latest comment, Is your change merged into this repo's current master? Or do I still need to pick you fork?

JamesBarwell commented 9 years ago

Published today as 0.6.0, so just pull it in through npm.

hadesara commented 9 years ago

Sorry, haven't been able to test this yet. I will test it soon and provide feedback if any.

hadesara commented 9 years ago

Negative, Things seems to be broken 0.6.0. The change listeners do not work and even the callback read listener returns 'undefined'. Where as reverting to v0.5.2 has at least the callback read listeners works correctly.

hadesara commented 9 years ago

I take this back, the issue was with access permissions to /sys/class/gpio/gpio21/edge. Looks like all is well. Thank you for this update!

julienvincent commented 9 years ago

Ah yes this is something I intend to work on when I get time. Having to sudo run everything is impractical.