interfacing mpu9150 imu sensor with BBB

I’m running the test.js , a simple script to obtain raw data from the sensor on BBB rev C with debian, it happens to print out the output however, there is this error thrown at the end:

return callback(err, actualBuffer);
TypeError: undefined is not a function
at Object._onImmediate (/usr/local/lib/node_modules/mpu9150/node_modules/i2c/lib/
at processImmediate as _immediateCallback

here is the test program:

var mpu9150 = require('mpu9150');

// Instantiate and initialize.
var mpu = new mpu9150();

// Test the connection before using.
if (mpu.testConnection()) {

// Put the MPU9150 back to sleep.



change every error you have found in,like readByte,readBytes etc…

在 2014年12月13日星期六 UTC+8上午6:34:13,jamil…@gmail.com写道: