Skip to main content
YBeun
Visitor II
August 17, 2019
Question

I2C2 on STM32F103 Arduino

  • August 17, 2019
  • 1 reply
  • 1026 views

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

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
August 17, 2019

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 VenmoUp vote any posts that you find helpful, it shows what's working..