There is an akward behaviour:
mpu.initialize() seems to return false so this code won't print value.
if (myCar.Accelerometer.initialize()) {
console.log("MPU INIT SUCCESS");
setInterval(function(){
var values = myCar.Accelerometer.getMotion9();
var pitch = myCar.Accelerometer.getPitch(values);
var roll = myCar.Accelerometer.getRoll(values);
var yaw = myCar.Accelerometer.getYaw(values);
console.log('pitch value : ', pitch);
console.log('roll value : ', roll);
console.log('yaw value : ', yaw);
}, 200);
}
But this is working:
if (myCar.Accelerometer.initialize()) {
console.log("MPU INIT SUCCESS");
}
setInterval(function(){
var values = myCar.Accelerometer.getMotion9();
var pitch = myCar.Accelerometer.getPitch(values);
var roll = myCar.Accelerometer.getRoll(values);
var yaw = myCar.Accelerometer.getYaw(values);
console.log('pitch value : ', pitch);
console.log('roll value : ', roll);
console.log('yaw value : ', yaw);
}, 200);
Hello,
No is not possible to implement it.
You have to use the magnetometer if you want have yaw values or use some mathematical formula to predict this one.
ref: #8
Hi,
First of all thanks a lot for the library.
There is an akward behaviour:
mpu.initialize()
seems to return false so this code won't print value.But this is working:
Here is the debug display:
Do you have an idea ?
Why the getYaw is a 'return 0; ' ? Is it possible to implement it ?
Thanks a lot for your help.