M5StickC-Plus icon indicating copy to clipboard operation
M5StickC-Plus copied to clipboard

Wrong IMU pins

Open sylque opened this issue 1 year ago • 2 comments
trafficstars

Describe the bug

The sketch M5StickC-Plus/examples/Basics/IMU/IMU.ino doesn't work because the line imu6886.Init(32, 33) is wrong. With my device, it should be imu6886.Init(GPIO_NUM_21, GPIO_NUM_22).

To reproduce

  1. Compile and run M5StickC-Plus/examples/Basics/IMU/IMU.ino => IMU readings are random

Expected behavior

IMU readings are correct

Screenshots

No response

Environment

  • OS: Ms Windows
  • IDE &IDE Version: VSCode + PlatformIO
  • Repository Version: latest

Additional context

No response

Issue checklist

  • [X] I searched for previous reports in the issue tracker
  • [X] My report contains all necessary details

sylque avatar Jan 11 '24 11:01 sylque

Oops, it seems I'm using the wrong version of IMU.ino... Please let me investigate and clarify this.

sylque avatar Jan 11 '24 22:01 sylque

Ok, this is puzzling. There are two sketches for testing the IMU in this repo:

  1. https://github.com/m5stack/M5StickC-Plus/tree/master/examples/Basics/IMU
  2. https://github.com/m5stack/M5StickC-Plus/tree/master/examples/Unit/IMU_MPU6886

Only the second one has the issue described in this thread, the first one seems ok.

sylque avatar Jan 11 '24 22:01 sylque

You are right, Unit IMU_MPU6886 is an external device, using external I2C.

TinyuZhao avatar Jun 24 '24 03:06 TinyuZhao