Skip to content
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

What is the best way to work with two MPU9250 sensors on one I2C bus? #97

Open
Sterpa opened this issue Sep 17, 2018 · 0 comments
Open

Comments

@Sterpa
Copy link

Sterpa commented Sep 17, 2018

Dear mjs513,
what is the best way to work with two MPU9250 sensors on one I2C bus,
without multiplexers or special boards like EM7180_SENtral?

This is a very old question, and he has risen again in your branches, KrisWiner, and Brian Taylor.
kriswiner/MPU9250#68
kriswiner/MPU9250#205
#83
https://forum.pjrc.com/threads/37891-MPU-9250-Teensy-Library/page8

But we still have not come up with a simple solution to how to work with two sensors on the same bus (AK8963 always have 0x0c addres).

As I understand, there are two options:

Use pass through (as suggested by KrisWiner)
enable 0x68 pass through
disable 0x69 pass throough
read 0x68 and 0x0c
...
disable 0x68 pass through
enable 0x69 passthrough
read 0x69 and 0x0c

Use I2C master/slave mode (as suggested by mjs513 in FreeIMU).
But the first way was too slow, slow switching pass through mode.
And on the second way there are no examples with the code... In Brian's library (the author of the idea) there are no examples for the two sensors, and FreeIMU library is very complex, and I was not able to extract from it a part of the code with the implementation of the slave mode...

Maybe someone will help with an example of an effective code for two sensors (for September 2018)))? It would be nice to add this example to one of the popular libraries for working with the MPU9250. Or explain a little more about slave mode, how to use, litle code example? How to switch between two AK8963 in master/slave mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant