Doesn't work sample sketch "MP9250BasicAHRS" on M5Stack Gray
I bought M5Stack Gray for motion sencing of wheelchair.
I installed M5Stack library and sketched on my Mac and basic sketch worked fine.
Also I tried to install sample sketch "MP9250BasicAHRS", but it didn't.
- comple and download into M5Stack was work fine
- Then I checked behavior of M5Stack via Serial Monitor and following message was displayed.
MPU9250 I AM 0 I should be 71
MPU9250 is online...
x-axis self test: acceleration trim within : 2.2% of factory value
y-axis self test: acceleration trim within : 8.4% of factory value
z-axis self test: acceleration trim within : 1.6% of factory value
x-axis self test: gyration trim within : -0.0% of factory value
y-axis self test: gyration trim within : 0.0% of factory value
z-axis self test: gyration trim within : 0.8% of factory value
Guru Meditation Error: Core 1 panic'ed (IntegerDivideByZero). Exception was unhandled.
Core 1 register dump:
PC : 0x400d3ba5 PS : 0x00060730 A0 : 0x800d1412 A1 : 0x3ffb1f20
A2 : 0x3ffc2494 A3 : 0x3ffc2520 A4 : 0x3ffc252c A5 : 0x3ffb1f50
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x00000000
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x00000002 A13 : 0x00000002
A14 : 0x3ffb1f50 A15 : 0x00000000 SAR : 0x0000001c EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000
It look like that MPU9250 didn't calibrate.
Is this following line correct?
// Calibrate gyro and accelerometers, load biases in bias registers
I've no idea to fix this problem and will you help or give advises?
I have the same problem, I just bought and received a gray model that said it has the MPU9250, but
I can't seem to get it to work. My error is almost the same, the calibration numbers are a little different, otherwise same error.
Someone please tell us how to fix this.
I'm on a Linux Mint box (19.0, 64bit, 4gb ram, Arduino 1.8.5 IDE) Updated ESP32 cores, etc.
I've tried all the versions of the M5Stack library that are available via the library manager, all give the same error.
The latest arduino-esp32 I2C have a problem, I checkout out to the e63aa4065092c9a3a0547b2649a509585866ce87 can fix the problem.
cd ~/Documents/Arduino/hardware/espressif/esp32 git checkout e63aa4065092c9a3a0547b2649a509585866ce87
@bin That worked, thank you.
Thank you for your comments and advise.
My M5Stack work fine too after update library by 0x1abin's advise.
HI, I faced the same problem, but it seems to be fixed on this commit for now.