i2cdevlib icon indicating copy to clipboard operation
i2cdevlib copied to clipboard

stm32duino mpu6050 with dmp not working in PlatformIO ide

Open DLDDDL opened this issue 3 years ago • 1 comments

When I use this MPU6050 library, STM32(Bluepill) does not work under the Arduino framework of PlatformIO ide. I can find the address of mpu6050 through I2C detection program, but there is an error when running demo MPU6050_DMP6.

DMP initialization failed (code1)

Has anyone encountered this problem and how to solve it?

DLDDDL avatar Jul 18 '22 07:07 DLDDDL

Check the I2Cdev.h for the following configuration:

#define I2CDEV_IMPLEMENTATION I2CDEV_ARDUINO_WIRE //#define I2CDEV_IMPLEMENTATION I2CDEV_TEENSY_3X_WIRE // #define I2CDEV_IMPLEMENTATION I2CDEV_BUILTIN_SBWIRE // #define I2CDEV_IMPLEMENTATION I2CDEV_BUILTIN_FASTWIRE

The other options don't work with STM32duino.

Also, connect to 5V not 3V3.

anirudhchhabra96 avatar Nov 12 '22 05:11 anirudhchhabra96