Jump to content
I2Cdevlib Forums

ihart

Members
  • Posts

    1
  • Joined

  • Last visited

ihart's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I am using the MPU-6050 for a Segway clone using an Arduino Uno. The MPU-6050 is laid flat on the top of the segway platform with the Y axis used to measure front/back tilt. Left/right rotation would be on the Z axis. The front and back tilt seems to be working but when I turn left or right, the ZGyro seems to be coupling into the YGyro which is used for front/back tilting. This causes the segway to dip when I turn left and raise up when I turn right. When I look at the Arduino serial monitor with no motors enabled, I can see this behavior showing in my scrolling gyros printout. In fact, the front back Y Axis motion seems to couple in to the Z axis Gyro as well. Has anyone seen this before? Any idea what might be causing this? Some relevant code snips: #include <Wire.h> #include "I2Cdev.h" #include "MPU6050_6Axis_MotionApps20.h" // supply your own gyro offsets here, scaled for min sensitivity mpu.setXGyroOffset(10); mpu.setYGyroOffset(7); mpu.setZGyroOffset(14); mpu.setZAccelOffset(900); // 1688 factory default for test chip //Get sensor data mpu.dmpGetQuaternion(&q, fifoBuffer); mpu.dmpGetGyro(gyro, fifoBuffer); mpu.dmpGetGravity(&gravity, &q); mpu.dmpGetYawPitchRoll(ypr, &q, &gravity);
×
×
  • Create New...