cancel
Showing results for 
Search instead for 
Did you mean: 

I2C2 on STM32F103 Arduino

YBeun
Associate

Hi,

I just uploaded the MPU6050 library to communicate with my STM32F103.

Example program is MPU6050DMP6.

All works fine when I use I2C1 (default I2C bus).

But I want to use the I2C2 bus (controller has 2).

I found information stating:

 #include "Wire.h"

extern TwoWire Wire1;

And in my setup part use:

    Wire.begin();

    Wire1.begin(); /Wire1 should use second port...

For the rest there are no more Wire instructions in the MPU6050_DMP6 program.

I can compile it, but when downloading, it just crashes....

Any idea's what goes wrong or where I can find more data?

Thank you

1 REPLY 1

Perhaps the Arduino forum/community would be a better place to address failures/bugs in that platform?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..