How do I use this source code?

I bought a 10 DOF IMU from China. As expected, English documentation isn't great, but I did manage to find the source code to interface with it.

Problem is, I don't understand if it is/isn't a library, and if it is, how to install it.

I've included the same zip file I found with the product, and I would love your input.

Thanks

10-DOF-IMU-Sensor-B-code.zip (353 KB)

Please post a link to where you bought the IMU from. Use the chain links icon on the toolbar to make the URL clickable.

Does it have 3 chips on it?
a pressure sensor
a magnetometer
a gyro and accelerometer

The Gyro and Accelerometer is the MPU6050

if it has just 2 chips then the gyro and accelerometer magnometer is the MPU9250

put the MPU6050 files in the libraries folder in your sketch folder
open the Arduino IDE
open the MPU6050_Latest_code.ino
see if it can talk to the gyro accelerometer on your board

Z

MPU6050_Latest_code.ino (7.78 KB)

MPU6050.zip (74.5 KB)

I would prefer to have access to the gyrometer, accelerometer, barometer and compass if possible.

Anyway, it appears I did submit the wrong code files, as I actually have version C of the model. Code setup appears similar though.

The page with everything is here.

CantSayIHave:
I would prefer to have access to the gyrometer, accelerometer, barometer and compass if possible.

Anyway, it appears I did submit the wrong code files, as I actually have version C of the model. Code setup appears similar though.

The page with everything is here.

Your breakout board has 2 chips, the barometer and the gyro accelerometer compass mpu9255. The mpu9255 has a built in microprocessor that can handle digital motion processing! Internally the mpu9055 has a compass attached to the internal mpu6050's secondary i2c bus. Using the mpu6050 library you can access the compass in the same way you would if they were separate chips. Confusing :slight_smile: I'll try to help more when I get to my computer.

Z

MPU-9255Cal.ino is for getting calibration offsets for the mpu9055 I created this from the documentation and some example sketches

The rest allow for getting all the values from the gyro accel and compass

/* ================================================================================================ *
| Default MotionApps v4.1 48-byte FIFO packet structure: |
| |
| [QUAT W][ ][QUAT X][ ][QUAT Y][ ][QUAT Z][ ][GYRO X][ ][GYRO Y][ ] |
| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
| |
| [GYRO Z][ ][MAG X ][MAG Y ][MAG Z ][ACC X ][ ][ACC Y ][ ][ACC Z ][ ][ ] |
| 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |

  • ================================================================================================ */

Haven't played with this coed in a while but last time I did it worked:)
let me know if you have any questions

Z

helper_3dmath.h (6.26 KB)

MPU9255.cpp (125 KB)

MPU9255.h (42.5 KB)

MPU9255_9Axis_MotionAppsHEC.h (47.1 KB)

MPU9255_DMP6_Gyro_is_Zero.ino (4.89 KB)

MPU-9255Cal.ino (44.7 KB)