Hi
I am trying to read MPU6050 using STM32duino. I got the MPU SCL, SDA connected to PB6 and PB7 of my STM32F407VG DiyMore Black Board.
First I tried to scan the address using the I2C scanner in the Examples under Wire.
It does not detect MPU6050. There is no problem with my MPU6050 breakout as it communicates well with Arduino Uno. Can somebody help me to get this issue settled.
Regards
Arduino IDE does not recognize MPU6050 initialized by Wire.h
-
- Posts: 9
- Joined: Tue Dec 10, 2024 12:33 am
Arduino IDE does not recognize MPU6050 initialized by Wire.h
If you're using DIYMORE f407VGT variant, it won't work on PB6 and PB7 as default I2C pins are PB8, PB9. Same for F407Vx variant.
in variants\STM32F4xx\F407V(E-G)T_F417V(E-G)T\variant_DIYMORE_F407VGT.h
Go to full postin variants\STM32F4xx\F407V(E-G)T_F417V(E-G)T\variant_DIYMORE_F407VGT.h
Code: Select all
// I2C Definitions
#ifndef PIN_WIRE_SDA
#define PIN_WIRE_SDA PB9
#endif
#ifndef PIN_WIRE_SCL
#define PIN_WIRE_SCL PB8
#endif
Re: Arduino IDE does not recognize MPU6050 initialized by Wire.h
Add pull up resistors on each I2C lines.
Re: Arduino IDE does not recognize MPU6050 initialized by Wire.h
If you're using DIYMORE f407VGT variant, it won't work on PB6 and PB7 as default I2C pins are PB8, PB9. Same for F407Vx variant.
in variants\STM32F4xx\F407V(E-G)T_F417V(E-G)T\variant_DIYMORE_F407VGT.h
in variants\STM32F4xx\F407V(E-G)T_F417V(E-G)T\variant_DIYMORE_F407VGT.h
Code: Select all
// I2C Definitions
#ifndef PIN_WIRE_SDA
#define PIN_WIRE_SDA PB9
#endif
#ifndef PIN_WIRE_SCL
#define PIN_WIRE_SCL PB8
#endif
Last edited by GonzoG on Mon Dec 16, 2024 9:44 am, edited 1 time in total.
-
- Posts: 9
- Joined: Tue Dec 10, 2024 12:33 am
Re: Arduino IDE does not recognize MPU6050 initialized by Wire.h
Gonzog and all
The transfer of the connections to PB8 and PB9 sorted out the matter. Thanks a lot again. It is really great to have support of this level. The pinout I of the diyMore board am using is as attached.
I am not sure whether this document is not correct. Please share the correct one if you have it.
Thanks again for the prompt help.
Regards
The transfer of the connections to PB8 and PB9 sorted out the matter. Thanks a lot again. It is really great to have support of this level. The pinout I of the diyMore board am using is as attached.
I am not sure whether this document is not correct. Please share the correct one if you have it.
Thanks again for the prompt help.
Regards