-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arduino ide for esp8266 use MPU6050 #7
Comments
i use +-2g but "norm" data more than 2,i can not understand why? |
my code: /* #include <Wire.h> MPU6050 mpu; void setup() Serial.println("Initialize MPU6050"); while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G)) // If you want, you can set accelerometer offsets checkSettings(); void checkSettings() Serial.print(" * Sleep Mode: "); Serial.print(" * Clock Source: "); Serial.print(" * Accelerometer: "); Serial.print(" * Accelerometer offsets: "); Serial.println(); void loop() Serial.print(" Xraw = "); Serial.println(rawAccel.ZAxis); delay(1000); |
Data types do have different memory sizes assigned when using ESP platform. |
moreover |
Yeah found the same problem. In original Arduino environment this makes sense, the int were 16bit, than the Vector class was intended for general calculation.. |
I use arduino-MPU6050-master library , No matter how I flip it my serial output is positive and I can't get negative numbers。
like this:
Xnorm = 0.08 Ynorm = 38.57 Znorm = 7.81
Xraw = 84.00 Yraw = 64588.00 Zraw = 13068.00
Xnorm = 0.14 Ynorm = 38.64 Znorm = 7.82
Xraw = 232.00 Yraw = 64724.00 Zraw = 12860.00
Xnorm = 0.18 Ynorm = 38.74 Znorm = 7.77
Xraw = 36.00 Yraw = 64540.00 Zraw = 13124.00
Xnorm = 0.03 Ynorm = 38.63 Znorm = 7.85
Xraw = 64744.00 Yraw = 65072.00 Zraw = 10928.00
Xnorm = 38.79 Ynorm = 38.95 Znorm = 6.97
Xraw = 65244.00 Yraw = 65080.00 Zraw = 13208.00
Xnorm = 39.00 Ynorm = 38.86 Znorm = 7.78
Xraw = 65284.00 Yraw = 64800.00 Zraw = 13284.00
Xnorm = 38.98 Ynorm = 38.78 Znorm = 7.91
Xraw = 65116.00 Yraw = 1248.00 Zraw = 12456.00
Xnorm = 39.03 Ynorm = 0.20 Znorm = 7.50
Xraw = 64716.00 Yraw = 64716.00 Zraw = 13124.00
Xnorm = 38.69 Ynorm = 38.82 Znorm = 7.83
The text was updated successfully, but these errors were encountered: