Hello,
 could you help me with this
I'm using beaglebone green ,but since the processors are same i used the 
following code to see if my i2c is working.
but when i run this code in cloud9 ,it shows a similar error as the 
previous post.
 

> var b = require('bonescript');
>
> var port = '/dev/i2c-1';
>
> var address = 0x0D;
>
> b.pinMode("P9_29", b.OUTPUT);
>
> b.pinMode("P9_30", b.OUTPUT);
>
> b.digitalWrite("P9_29", b.HIGH);
>
> b.digitalWrite("P9_30", b.LOW);
>
> b.i2cOpen('/dev/i2c-1',0x0D, {});
>
> b.i2cWriteBytes('/dev/i2c-1', 0x00, [0x00]);
>
> b.i2cWriteBytes('/dev/i2c-1', 0x80, 0x07);
>
> b.i2cWriteBytes('/dev/i2c-1', 0x81, 0x18);
>


ERROR :

/var/lib/cloud9/NewFolder/i2cTest.js:6

b.i2cOpen(port, address, {});

  ^

Debugger listening on [::]:15454

/usr/local/lib/node_modules/bonescript/src/my.js:425

                if(callback) callback({err:'Kernel does not include CapeMgr 
module'});

                             ^

 

TypeError: callback is not a function

  at Object.newFunction [as i2cOpen] 
(/usr/local/lib/node_modules/bonescript/src/my.js:425:30)

  at Object.<anonymous> (/var/lib/cloud9/i2c.js:8:3)

  at Module._compile (module.js:570:32)

  at Object.Module._extensions..js (module.js:579:10)

  at Module.load (module.js:487:32)

  at tryModuleLoad (module.js:446:12)

  at Function.Module._load (module.js:438:3)

  at Timeout.Module.runMain [as _onTimeout] (module.js:604:10)

  at ontimeout (timers.js:386:11)

  at tryOnTimeout (timers.js:250:5)

  at Timer.listOnTimeout (timers.js:214:5)

 

 

 

Process exited with code: 1


Could you please help me with this. I'm new to the beaglebone Board.
 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/4d2e432d-9d6a-4898-b1af-1c1a7180be70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to