0

I want to use node.js to parse data from a java script application back to the node.js server, I have accomplished this in a very rudimentary form and now I want to have the data turn on or off the GPIO pins on the Pi B+. I attempted doing that with this module: https://www.npmjs.com/package/pi-gpio a problem I ran into is that apparently it's file path is outdated and there isn't really any easy way around it. I was wondering if anyone knew of an ulterior way of interfacing with the GPIO pins in Node.js.

asked Feb 22, 2015 at 22:14
1
  • If all else fails you could use syscalls to the Python gpio package. It wouldn't be fast but it would always work Commented Apr 11, 2015 at 10:45

2 Answers 2

4

I suggest using this module to switch and read GPIO pins, it is easy to handle and works very well: https://www.npmjs.com/package/onoff

Another module: https://www.npmjs.com/package/rpio

answered Apr 11, 2015 at 10:38
2
  • I find this module rather slow compared to the Python plugin and it is hard to configure pull-up / -down resistors that one looks good: npmjs.com/package/rpio Commented Feb 6, 2018 at 6:59
  • i did not know that one, will include it, thanx! Commented Feb 6, 2018 at 8:13
-1

Use this module: https://www.npmjs.com/package/node-cmd

And use the gpio shell commands.

Run gpio -h on raspberry pi terminal to find syntax.

answered Feb 6, 2018 at 8:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.