百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

MPU9250_WE

> 编程语言
开源

这是一个用于 9 轴加速度计、陀螺仪和磁力计 MPU9250 和 MPU6500 的 Arduino 库。它包含许多示例程序,使其易于使用。

100 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

这是一个用于 9 轴加速度计、陀螺仪和磁力计 MPU9250 和 MPU6500 的 Arduino 库。它包含许多示例程序,使其易于使用。

MPU9250_WE

An Arduino library for the 9-axis accelerometer, gyroscope and magnetometer MPU9250 and the MPU6500. In essence the MPU6500 is a MPU9250 without the magnetometer. The library also provides basic support for the MPU6050.

The library contains many example sketches with lots of comments to make it easy to use. I have written them for the MPU9250 / I2C. You can "translate" them easily for the MPU6500. MPU6500_all_data.ino shows how to do this. The use of SPI is shown in MPU9250_SPI_all_data.ino and MPU6500_SPI_all_data.ino.

For further information visit my blog:

https://wolles-elektronikkiste.de/mpu9250-9-achsen-sensormodul-teil-1 (German)

https://wolles-elektronikkiste.de/en/mpu9250-9-axis-sensor-module-part-1 (English)

If you find bugs please inform me. If you like the library it would be great if you could give it a star.

If you are not familiar with the MPU9250 I recommend to work through the example sketches in the following order:

  1. MPU9250_acceleration_data.ino
  2. MPU9250_gyroscope_data.ino
  3. MPU9250_calibration.ino
  4. MPU9250_reusing_autocalib_data.ino
  5. MPU9250_magnetometer_data.ino
  6. MPU9250_all_data.ino
  7. MPU9250_data_rate_test.ino
  8. MPU9250_angles_and_orientation.ino
  9. MPU9250_pitch_and_roll.ino
  10. MPU9250_data_ready_interrupt_and_cycle.ino
  11. MPU9250_wake_on_motion_interrupt.ino
  12. MPU9250_FIFO_stop_when_full.ino
  13. MPU9250_FIFO_continuous.ino
  14. MPU6500_all_data.ino
  15. MPU6050_all_data.ino

The sketch MPU9250_blank_all_settings.ino can be used as a basis for your own sketches. It contains all setting options.

If the MPU9250 / MPU6500 does not respond

There are various modules with different MPUxxxx ICs out there. Sometimes it's not clearly defined in online-shops what you will really get if you buy an MPU9250/MPU6500 module. It might be an MPU9250, it might be an MPU6500 or it might be something else, although the modules look the same. An indication is the label on the MPUxxxx IC:

The labels I am aware of are:

  • MP92: MPU9250
  • MP65: MPU6500
  • MP651: MPU6515

You can also run the example sketch MPU9250_who_am_I.ino to find out which device you have.

I am using the "Who I am" registers of the MPU9250, MPU6500 and the magnetometer AK8963 to check if the modules are connected. If you create an MPU9250 object, but, for example, you are actually using an MPU6500, the init functions will return "false". However, the gyroscope and the accelerometer will work, because all related registers are the same. For other variants it might be similar. If the library works although you are using a different MPUxxxx, then just be happy, but you will have to live with the init function returning "false" - or find an alternative library.

Support of the MPU6050

The library does support the MPU6050 only to a limited extent. You can query the accelaration, gyroscope and temperature values, and you can choose the range. But more advance functions like WOM interrupt, FIFO and others will no work properly. And I do not intend to work further on MPU6050 functions.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++accelerometerarduinoarduino-libraryeasy-to-use

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言