jstapels / mpu6050 Goto Github PK
View Code? Open in Web Editor NEWMinimal Node.js module for reading the raw data from an MPU6050.
License: MIT License
Minimal Node.js module for reading the raw data from an MPU6050.
License: MIT License
should use var buffer =
instead of buffer =
. Also adding "use strict";
is perhaps worth considering.
I generally caught the issue using mocha in my project for integration testing. Could consider adding here jshint perhaps if you're still interested in this library.
HI!
in your library can I use the callback() ? you provide an example?
Thank you.
Hey, I got a problem.
This code works:
var i2c = require('i2c');
var address = 0x68;
var wire = new i2c(address, {device: '/dev/i2c-1'});
But this one not:
var mpu6050 = require( 'mpu6050' );
var mpu = new mpu6050('/dev/i2c-1', 0x68);
if( mpu.initialize() ){
console.log( "success" );
} else {
console.log( "fail" );
}
I think there is a problem with the address, but I'm not sure. Can you help me?
I tried the MPU6050 code but it throws the following error on the mpu.setSleepEnabled(1);
/usr/lib/node_modules/i2c/lib/i2c.coffee:136
return callback(err, actualBuffer);
^
TypeError: undefined is not a function
at Immediate._onImmediate (/usr/lib/node_modules/i2c/lib/i2c.coffee:85:9)
at processImmediate as _immediateCallback
Thanks.
on
setInterval(() => {
mpu.getMotion6(function (err, data) {
console.log(data)
})
}, 10);
i get
[ 4192, -332, 14092 , 48 , -262, -182 ]
Ax Ay AZ Gx Gy Gz
is that right ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.