I’ve written a new Node.js module called i2c-bus for accessing I2C devices on Linux boards like the BeagleBone Black.
It can be found here on github: https://github.com/fivdi/i2c-bus
I’ve written a new Node.js module called i2c-bus for accessing I2C devices on Linux boards like the BeagleBone Black.
It can be found here on github: https://github.com/fivdi/i2c-bus
Can you describe any advantages it has over node-i2c?
Sure, here are a number of things that come to mind:
There is one more thing:
Thanks for this, I was looking at node-i2c & how to implement scan & went all cross eyed.
Why do I get this error? I was just including i2c-bus in the project like this. I am using nodejs v0.10.40 on Raspberry Pi 2 Raspbian:
var i2c = require(‘i2c-bus’);
pi@raspberrypi ~/Projects/noderadio $ sudo nodejs noderadio2.js
/home/pi/Projects/noderadio/node_modules/i2c-bus/node_modules/bindings/bindings.js:83
throw e
^
Error: /home/pi/Projects/noderadio/node_modules/i2c-bus/build/Release/i2c.node: undefined symbol: node_module_register
This is an odd place for a question about the Raspberry Pi
A guess would be that i2c-bus, which is a native addon, was installed with one version of Node.js but is being run with another version of Node.js. Reinstall i2c-bus and try again.