M5StickC-Plus
M5StickC-Plus copied to clipboard
Wrong IMU pins
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
- 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
Oops, it seems I'm using the wrong version of IMU.ino... Please let me investigate and clarify this.
Ok, this is puzzling. There are two sketches for testing the IMU in this repo:
- https://github.com/m5stack/M5StickC-Plus/tree/master/examples/Basics/IMU
- 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.
You are right, Unit IMU_MPU6886 is an external device, using external I2C.