Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPIO expansion support #23

Open
aleclofabbro opened this issue Sep 9, 2014 · 2 comments
Open

GPIO expansion support #23

aleclofabbro opened this issue Sep 9, 2014 · 2 comments

Comments

@aleclofabbro
Copy link

Does this module support GPIO expansions like MCP23017 and similar?

@tjanson
Copy link
Collaborator

tjanson commented Sep 9, 2014

No, but it should be fairly easy to add. pi-gpio is essentially a node wrapper for the gpio utility, which works with the MCP23017.

I'm not sure whether these pins can can be gpio exported; if yes, It's just a matter of adding the -x mcp23017:100:0:0 (e.g., here).

If not, it'd be a bit more complicated, as the /sys/devices/virtual/gpio read/writes (e.g.) would have to be replaced by execs calling e.g., gpio -x mcp23017:100:0:0 read 101.

Does that help?

Oh, as an alternative: wiring-pi for node supports this out of the box. It wraps the (entire, I think?) WiringPi C library as a native addon to node. Relevant function.

@aleclofabbro
Copy link
Author

thanks,
i put my question just to test the water ..
i'm not developing yet, i'm waiting for my first PI to come :) !
but i looked at the code, and i thought that it would have been enough to change the pinMapping properly...
i'll look to that alt module as well!
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants