-
Notifications
You must be signed in to change notification settings - Fork 237
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
Disable bypass in MPU6050 driver and expose I2C Master Bus #194
base: public
Are you sure you want to change the base?
Disable bypass in MPU6050 driver and expose I2C Master Bus #194
Conversation
…id issues with non-SMBus ready devices on the main bus.
The implementation is using more memory than needed. Since it targets microcontrollers, I would like to look at rearranging the code a bit to reduce that. The
Notice that the Then the getter just needs to connect the i2c instanced to the class constructor returned, something like this:
I don't have the hardware to run this myself, so I can't try it out. If you can, please let me know how it goes. Thanks. |
Hi @zBuffer, I'm unable to test this change, because the revision of the M5Stack Fire hardware that I have is the one with the MAG3110 sensor connected directly to the ESP32's i2c bus. (See this note in the M5Stack schematics repo: I had initially configured the MPU6050 driver to use the bypass mode so that the various revisions of the M5Stack Fire (and Gray, etc.) hardware could use the same MPU6050 and MAG3110 drivers as each other. But, as you note, this seems to not work with all of the M5Stack accessories. Given the wide array of M5Stack configurations and revisions (and the variety of projects developers are building with them), I think it would be best to organize this change so that it is optional for users of the mpu6050 module and so that we can easily turn the i2c bypass on and off for the different development targets. I suggest that by default we leave the configuration as it was, with the bypass enabled and the internal i2c master turned off. Then modify the Cheers, |
Enabling bypass in MPU6050 causes problems for non-SMBus devices sitting on the I2C bus, as seen in #192 . The slave devices connected to MPU6050 can be accessed indirectly using
MPU6050.I2CMasterBus
, which the prototype is similar toSMBHold
.