pi-gpio
pi-gpio copied to clipboard
Looking forward to I2C and SPI for node.js of Rpi
Thx for GPIO Happy to do some work on I2C and SPI if you have a starting point. Paul
Hey @paultanner. I don't have a starting point yet, but I'm considering several options:
- Bit-banging the protocol. Not too excited about this approach.
- Moving to wiring-pi, which seems to have done a bulk of the work already. There are already wrappers in other languages. We could just learn from the other implementations and adapt that for node. This is what seems most appealing to me.
- It appears that Wheezy now comes with I2C and SPI drivers. Not sure if wiring-pi wraps over them. If wiring-pi does that already, I'd rather wrap around wiring-pi. If not, we could wrap around the drivers directly.
- Any other suggestions you might have?
Thx for the quick reply Rakesh, I'm using the Black Raspberry Pi distro which has kernel support. Interface code in C++ is available (derived from Gertboard code). I got a copy from skpang.co.uk Could this C++ code be wrapped for node? (Not something I've done.) Paul At 11:57 AM 9/26/2012, you wrote:
Hey https://github.com/paultanner@paultanner. I don't have a starting point yet, but I'm considering several options:
- Bit-banging the protocol. Not too excited about this approach.
- Moving to https://projects.drogon.net/raspberry-pi/wiringpi/wiring-pi, which seems to have done a bulk of the work already. There are already wrappers in other languages. We could just learn from the other implementations and adapt that for node. This is what seems most appealing to me.
- It appears that Wheezy now comes with I2C and SPI drivers. Not sure if wiring-pi wraps over them. If wiring-pi does that already, I'd rather wrap around wiring-pi. If not, we could wrap around the drivers directly.
- Any other suggestions you might have?
Reply to this email directly or https://github.com/rakeshpai/pi-gpio/issues/1#issuecomment-8886094view it on GitHub.
Paul Tanner - Virtual Technologies - http://www.virtual-techno.com Tel: +44 1494 581979 Mob: +44 7973 223239 mailto:[email protected]
Unfortunately, it isn't something I've done either. I'll spend some time to learn about this soon-ish though.
Hey @rakeshpai, I'm also pretty interested in creating/adapting a node.js module, using the WiringPi library, mainly because of the interruptions support... are you working on it?
Any update on this?
Any update on this?
This is the problem: I've unfortunately got tied up some things, and it will be some time before I get back to hardware hacking again. It might take a month or two. Until then, you'll either have to wait, or I'll gladly accept pull requests.
i2c on node.js is done, seems to work on the Pi: https://npmjs.org/package/i2c
As for SPI, let's take a look at that too.
If this project isn't dead...
There are now three NodeJS implementations of SPI:
- RussTheAerialist/node-spi 38 Stars, 11 Forks*
- natevw/pi-spi 4 Stars, 2 Forks*
- fjw/node-simplespi 1 Star, 1 Fork* (probably just the author) *Data is from the time of this post.
I haven't been able to test any of them myself yet, but RussTheAerialist/node-spi looks promising. Considering that this has been down at least three times now (and I2C is also complete), this issue should be closed unless a fourth version will be made. Or, these could be dependencies of this library, but that would be clunky and indirect. It would also make issues for that library probably show up here.
@DaAwesomeP I will look into that when I get a chance but it might be a few weeks before I have the time.