BeagleBone Black Library(Cloud9)

Hello, I have done a git clone on https://github.com/korevec/node-i2c. Now I want to use those in the cloud9 IDE. But when I typed
var i2c = require(‘i2c’);

And error shows up:

module.js:340
throw err;
^
Error: cannot find module ‘i2c’

Can someone help me. Thx :slight_smile:

Hello, I have done a git clone on https://github.com/korevec/node-i2c.
Now I want to use those in the cloud9 IDE. But when I typed
var i2c = require('i2c');

And error shows up:

module.js:340
      throw err;
          ^
Error: cannot find module 'i2c'

Can someone help me. Thx :slight_smile:

node has very specific path requirements that you should read about
elsewhere. If you put it at the path 'node_modules/i2c' relative to your
script, it should work. You could also use 'npm' to install it, even
globally using 'npm install -g i2c'.

I'm in the process of integrating node-i2c into bonescript and should
release it "any day now"(TM).

I was able to get it running in one of my projects here (http://circuitco.com/support/index.php?title=8x8_Bi-Color_LED_Matrix#Software). Try installing the i2c package again.

Has node-i2c been integrated into bonescript? If so can you post a link to a site that describes how to use it.

Has node-i2c been integrated into bonescript?

It has.

If so can you post a link to a
site that describes how to use it.

The readme at https://github.com/jadonk/bonescript shows the functions
that are integrated. The referenced library shows details on how to
use it.